Show
Ignore:
Timestamp:
08/01/08 16:03:27 (5 months ago)
Author:
jtang
Message:

Preliminary ovaldi SELinux policy.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branch/RHEL-5.2-20080702merge/src/selinux-policy-clip/policy/modules.conf

    r206 r229  
    17911791netlabel = module 
    17921792 
     1793# Layer: apps 
     1794# Module: ovaldi 
     1795# 
     1796# OVAL interpreter 
     1797#  
     1798ovaldi = module 
     1799 
    17931800# Layer: system 
    17941801# Module: pcmcia 
  • branch/RHEL-5.2-20080702merge/src/selinux-policy-clip/policy/modules/apps/ovaldi.fc

    r153 r229  
    1 /usr/bin/updatedb               --      gen_context(system_u:object_r:locate_exec_t, s0) 
    2 /var/lib/[sm]locate(/.*)?               gen_context(system_u:object_r:locate_var_lib_t,s0) 
     1/usr/sbin/ovaldi                --      gen_context(system_u:object_r:ovaldi_exec_t, s0) 
     2/usr/sbin/ovaldi.sh             --      gen_context(system_u:object_r:ovaldi_exec_t, s0) 
     3/var/log/ovaldi(/.*)?                   gen_context(system_u:object_r:ovaldi_log_t,s0) 
  • branch/RHEL-5.2-20080702merge/src/selinux-policy-clip/policy/modules/apps/ovaldi.if

    r153 r229  
    1 ## <summary>Update database for mlocate</summary> 
    2  
    3 ######################################## 
    4 ## <summary> 
    5 ##      Create the locate log with append mode. 
    6 ## </summary> 
    7 ## <param name="domain"> 
    8 ##      <summary> 
    9 ##      Domain allowed access. 
    10 ##      </summary> 
    11 ## </param> 
    12 
    13 interface(`slocate_create_append_log',` 
    14         gen_require(` 
    15                 type locate_log_t; 
    16         ') 
    17  
    18         logging_search_logs($1) 
    19         create_files_pattern($1,locate_log_t,locate_log_t) 
    20         append_files_pattern($1,locate_log_t,locate_log_t) 
    21 ') 
    22  
    23 ######################################## 
    24 ## <summary> 
    25 ##      Read locate lib files. 
    26 ## </summary> 
    27 ## <param name="domain"> 
    28 ##      <summary> 
    29 ##      Domain allowed access. 
    30 ##      </summary> 
    31 ## </param> 
    32 
    33 interface(`locate_read_lib_files',` 
    34         gen_require(` 
    35                 type locate_var_lib_t; 
    36         ') 
    37  
    38         read_files_pattern($1,locate_var_lib_t,locate_var_lib_t) 
    39         allow $1 locate_var_lib_t:dir list_dir_perms; 
    40         files_search_var_lib($1) 
    41 ') 
     1## <summary>OVAL Interpreter</summary> 
  • branch/RHEL-5.2-20080702merge/src/selinux-policy-clip/policy/modules/apps/ovaldi.te

    r203 r229  
    1  
    2 policy_module(slocate,1.7.0) 
     1policy_module(ovaldi,1.0) 
    32 
    43################################# 
     
    76# 
    87 
    9 type locate_t; 
    10 type locate_exec_t; 
    11 init_system_domain(locate_t,locate_exec_t) 
     8type ovaldi_t; 
     9type ovaldi_exec_t; 
     10init_system_domain(ovaldi_t,ovaldi_exec_t) 
     11role sysadm_r types ovaldi_t; 
    1212 
    13 type locate_log_t; 
    14 logging_log_file(locate_log_t) 
    15  
    16 type locate_var_lib_t; 
    17 files_type(locate_var_lib_t) 
     13type ovaldi_log_t; 
     14logging_log_file(ovaldi_log_t) 
    1815 
    1916######################################## 
     
    2219# 
    2320 
    24 allow locate_t self:capability { chown dac_read_search dac_override fowner fsetid }; 
    25 allow locate_t self:process { execmem execheap execstack }; 
    26 allow locate_t self:fifo_file rw_fifo_file_perms; 
    27 allow locate_t self:unix_stream_socket create_socket_perms; 
     21allow ovaldi_t self:capability { dac_read_search dac_override fowner fsetid }; 
    2822 
    29 manage_dirs_pattern(locate_t,locate_var_lib_t,locate_var_lib_t) 
    30 manage_files_pattern(locate_t,locate_var_lib_t,locate_var_lib_t) 
     23corecmd_exec_bin(ovaldi_t) 
     24corecmd_exec_shell(ovaldi_t) 
    3125 
    32 kernel_read_system_state(locate_t) 
    33 kernel_dontaudit_search_sysctl(locate_t) 
     26files_list_all(ovaldi_t) 
     27files_getattr_all_files(ovaldi_t) 
    3428 
    35 corecmd_exec_bin(locate_t) 
     29fs_getattr_all_fs(ovaldi_t) 
     30fs_getattr_all_files(ovaldi_t) 
     31fs_list_all(ovaldi_t) 
    3632 
    37 dev_getattr_all_blk_files(locate_t) 
    38 dev_getattr_all_chr_files(locate_t) 
     33libs_use_shared_libs(ovaldi_t) 
     34libs_use_ld_so(ovaldi_t) 
    3935 
    40 files_list_all(locate_t) 
    41 files_getattr_all_files(locate_t) 
    42 files_getattr_all_pipes(locate_t) 
    43 files_getattr_all_sockets(locate_t) 
    44 files_read_etc_runtime_files(locate_t) 
    45 files_read_etc_files(locate_t) 
    46  
    47 fs_getattr_all_fs(locate_t) 
    48 fs_getattr_all_files(locate_t) 
    49 fs_list_all(locate_t) 
    50  
    51 # getpwnam 
    52 auth_use_nsswitch(locate_t) 
    53  
    54 libs_use_shared_libs(locate_t) 
    55 libs_use_ld_so(locate_t) 
    56  
    57 miscfiles_read_localization(locate_t) 
    58  
    59 ifdef(`enable_mls',` 
    60         # On MLS machines will not be allowed to getattr Anything but SystemLow 
    61         files_dontaudit_getattr_all_dirs(locate_t) 
    62 ') 
    63  
    64 optional_policy(` 
    65         cron_system_entry(locate_t, locate_exec_t) 
    66 ') 
     36miscfiles_read_localization(ovaldi_t)