        Linux.


========
    GPL .    - 
LGPL , ..       
.


======
 README-install .


=============
 :

    :

      :
        ./auditd
       (  ,     
       ,     
     ):
        ./auditctl -s
        ./auditctl -a entry,always -S open
        ls
        ./auditctl -d entry,always -S open


     :
	./auditctl -a exit,always -S all -F loginuid=2000
	./auditctl -L 2000,"test uid" 

  
===============================
2  sample.config     .
 contrib/capp.rules     /etc/audit.rules - 
       CAPP .


==========
   lkml: 
     http://marc.theaimsgroup.com/?t=107815888100001&r=1&w=2
     http://marc.theaimsgroup.com/?t=107901570800002&r=1&w=2


  
============================

        
: 1)       2)
    SELinux (/   
 ).     
  ,      
 , .., ,     
 CAPP    .

   :    (  
audit.c),          
 (    auditsc.c).   
   security/selinux/avc.c   , 
        
,    .

:
  1)       
     .    -   
        . ,    
     printk   syslog ( ).
  2)     ( ) 
           
      (    selinux/avc.c -   avc.c,
       ,  ).
  3)  -      , 
           , __
       , ,   
        .  ,   
          
     (    ).

  :
  1)    ,    
       ,  .
  2)      ,   
       ,   :   ,  
     ,   .
  3)        
     getname()  path_lookup().   ,  
        ,   ,
            . 
        ,     ,
       getname,  getname   
     ( )   . [ ,  
            
        , ,  , 
     .   ,  ,   
     ,  chroot("foo")     - "foo" 
         ,     
       "foo",       
     .     
     ,       (,
     -     )   
      ,   .]
  4)         
      ,      
     ,      inode ( ).
            
     , ,       (
     , ,  SELinux  avc  
         ,   
       ).     
         ,  
     selinux/avc.c (     inode),   -
       (, getname    ,  
             
       ). [ ,    
          ,  
           .]
  5)       .

     1,2  4     
  (,    -  
       ,  
   ).     ,   .  
  ,         
        (,
  d_path()).  ,     
     (, SELinux),    
  ,    ,   .

