| Server IP : 61.19.30.66 / Your IP : 216.73.216.15 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python2.7/dist-packages/apparmor/ |
Upload File : |
ó
qâÉXc @ s2 d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d e f d „ ƒ YZ e
a d e d „ Z
d „ Z e j d „ Z d „ Z d „ Z d
„ Z d „ Z d „ Z d
„ Z d „ Z d „ Z d „ Z d d d „ ƒ YZ d „ Z d „ Z d d „ Z d „ Z d S( iÿÿÿÿNt AppArmorExceptionc B s e Z d Z d „ Z d „ Z RS( s) This class represents AppArmor exceptionsc C s
| | _ d S( N( t value( t selfR ( ( s5 /usr/lib/python2.7/dist-packages/apparmor/easyprof.pyt __init__ s c C s
t | j ƒ S( N( t reprR ( R ( ( s5 /usr/lib/python2.7/dist-packages/apparmor/easyprof.pyt __str__ s ( t __name__t
__module__t __doc__R R ( ( ( s5 /usr/lib/python2.7/dist-packages/apparmor/easyprof.pyR s i c C sC y t j d | IJWn t k
r( n X| r? t j | ƒ n d S( s Print error message and exits ERROR: %sN( t syst stderrt IOErrort exit( t outt exit_codet do_exit( ( s5 /usr/lib/python2.7/dist-packages/apparmor/easyprof.pyt error( s
c C s- y t j d | IJWn t k
r( n Xd S( s Print warning messages WARN: %sN( R R
R ( R
( ( s5 /usr/lib/python2.7/dist-packages/apparmor/easyprof.pyt warn3 s
c C s* y | d | IJWn t k
r% n Xd S( s
Print messages %sN( R ( R
t output( ( s5 /usr/lib/python2.7/dist-packages/apparmor/easyprof.pyt msg; s
c C so t | ƒ y% t j | d t j d t j ƒ} Wn t k
rQ } d t | ƒ g SX| j ƒ d } | j | g S( s! Try to execute the given command.t stdoutR
i i ( t debugt
subprocesst Popent PIPEt STDOUTt OSErrort strt communicatet
returncode( t commandt spt exR
( ( s5 /usr/lib/python2.7/dist-packages/apparmor/easyprof.pyt cmdC s
c C st y4 t j | d t j ƒ} t j | d | j ƒ} Wn t k
rV } d t | ƒ g SX| j ƒ d } | j | g S( s# Try to pipe command1 into command2.R t stdini i ( R R R R R R R R ( t command1t command2t sp1t sp2R R
( ( s5 /usr/lib/python2.7/dist-packages/apparmor/easyprof.pyt cmd_pipeP s c C s6 t r2 y t j d | IJWq2 t k
r. q2 Xn d S( s Print debug messages DEBUG: %sN( t DEBUGGINGR R
R ( R
( ( s5 /usr/lib/python2.7/dist-packages/apparmor/easyprof.pyR \ s
c C s• y t j j | ƒ } Wn t k
r4 t d ƒ t SX| | k rO t d ƒ t St j j | ƒ se t St j j | ƒ } | | k r‘ t d ƒ t St S( s
Validate names' Could not find absolute path for binarys, Binary should use a normalized absolute paths Binary should not be a symlink( t ost patht abspatht ExceptionR t Falset existst Truet realpath( R* t a_patht r_path( ( s5 /usr/lib/python2.7/dist-packages/apparmor/easyprof.pyt valid_binary_pathe s
c C s t j d | ƒ r t St S( s Validate variable names [a-zA-Z0-9_]+$( t ret searchR/ R- ( t var( ( s5 /usr/lib/python2.7/dist-packages/apparmor/easyprof.pyt valid_variable_name| s c C sf d | } | j d ƒ s+ t d | ƒ t Sy t j j | ƒ Wn t k
ra t d | ƒ t SXt S( s
Valid paths Invalid path: %st /s
%s (relative)s %s (could not normalize)( t
startswithR R- R) R* t normpathR, R/ ( R* t m( ( s5 /usr/lib/python2.7/dist-packages/apparmor/easyprof.pyt
valid_pathƒ s
c C sO t | ƒ s d Sg } x( t j | d ƒ D] } | j | ƒ q* W| j ƒ | S( s$ Find contents of the given directorys /*N( R<