File: //lib64/python2.7/site-packages/setroubleshoot/access_control.pyo
�
�3�Zc @ sK d Z d d l Z d d l Z d d l Z d d l m Z d g Z y
e j Z Wn� e k
r3d d l
Z
d d l Z e
j � d Z
e j d e
� r� d Z q4e j d e
� r� d Z q4e j d e
� r� d
Z q4e j d e
� r� d Z q4e j d
e
� rd Z q4e j d e
� r*d Z q4d Z n Xd d d � � YZ d S( s� Access control for setroubleshoot. For now this is only used for
determining which users are allowed to connect to the server: see
UserServerAccess for more information.i����N( t
get_configt ServerAccessi s ^i\d86i s ^x86_64s ^(ppc|powerpc)i s
^(alpha|mips)i s ^sparci@ s ^parisci@ c B so e Z d Z i i e d 6d 6i e d 6d 6Z d � Z d � Z d � Z d � Z d � Z
d � Z d
� Z RS( sg
Determine if a user should be given access to the server based
on the configuration file.
t wildcardt clientt fix_cmdc C sC i | _ x3 t t j j � � D] } | j | � | j | <q Wd S( N( t
privilegest listR t keyst init_privilege( t selft privilege( ( sC /usr/lib64/python2.7/site-packages/setroubleshoot/access_control.pyt __init__D s c C s9 g t d d | � j d � D] } | j � ^ q } | S( Nt accesss %s_userst ,( R t splitt strip( R R
t namet cfg_names( ( sC /usr/lib64/python2.7/site-packages/setroubleshoot/access_control.pyR O s 2c C s4 | t j k } | r t St j t j d | � t S( Ns unknown access privilege (%s)( R R t Truet syslogt LOG_ERRt False( R R
t valid( ( sC /usr/lib64/python2.7/site-packages/setroubleshoot/access_control.pyt valid_privilegeT s
c C s9 | j | � s t St j | d s( t Sd | j | k S( NR t *( R R R R ( R R
( ( sC /usr/lib64/python2.7/site-packages/setroubleshoot/access_control.pyt unrestricted_privilegeZ s
c C sE | j | � s t S| j | � r&