Changeset 1817

Show
Ignore:
Timestamp:
05/16/06 13:36:25 (3 years ago)
Author:
cpebenito
Message:

move old strict, targeted, and mls policies to archive

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/docs/macro_conversion_guide

    r1690 r1817  
    3232# 
    3333optional_policy(`nscd',` 
    34         nscd_use_socket($1) 
     34        nscd_socket_use($1) 
    3535') 
    3636 
     
    4444# 
    4545# handled by appropriate interfaces 
     46 
     47# 
     48# exec_type: complete 
     49# 
     50corecmd_executable_file($1) 
    4651 
    4752# 
     
    120125        ') 
    121126') 
    122 optional_policy(`cron',` 
     127optional_policy(` 
    123128        cron_sigchld($1) 
    124129        cron_read_system_job_tmp_files($1) 
    125130') 
    126 optional_policy(`logrotate',` 
     131optional_policy(` 
    127132        logrotate_read_tmp_files($1) 
    128133') 
     
    131136# nscd_client_domain: complete 
    132137# 
    133 optional_policy(`nscd',` 
    134         nscd_use_socket($1) 
     138optional_policy(` 
     139        nscd_socket_use($1) 
    135140') 
    136141 
     
    143148# privlog: complete 
    144149# 
    145 optional_policy(`logging',` 
    146         logging_send_syslog_msg($1) 
    147 ') 
     150logging_send_syslog_msg($1) 
    148151 
    149152# 
     
    368371# can_exec_any(): complete 
    369372# 
    370 corecmd_exec_bin($1) 
    371 corecmd_exec_sbin($1) 
    372 domain_exec_all_entry_files($1) 
     373corecmd_exec_all_executables($1) 
    373374files_exec_etc_files($1) 
    374375libs_use_ld_so($1) 
     
    644645allow $1 $2:{ file lnk_file } { read getattr }; 
    645646allow $1 $2:process getattr; 
    646 # We need to suppress this denial because procps tries to access 
    647 # /proc/pid/environ and this now triggers a ptrace check in recent kernels 
    648 # (2.4 and 2.6).  Might want to change procps to not do this, or only if 
    649 # running in a privileged domain. 
    650 dontaudit $1 $2:process ptrace; 
    651647 
    652648# 
     
    788784kernel_read_kernel_sysctls($1_t) 
    789785dev_read_sysfs($1_t) 
     786domain_use_interactive_fds($1_t) 
    790787fs_search_auto_mountpoints($1_t) 
    791788term_dontaudit_use_console($1_t) 
    792 domain_use_interactive_fds($1_t) 
    793789init_use_fds($1_t) 
    794 init_use_script_pty($1_t) 
     790init_use_script_ptys($1_t) 
    795791libs_use_ld_so($1_t) 
    796792libs_use_shared_libs($1_t) 
     
    798794userdom_dontaudit_use_unpriv_user_fds($1_t) 
    799795ifdef(`targeted_policy',` 
    800         term_dontaudit_use_unallocated_tty($1_t) 
    801         term_dontaudit_use_generic_pty($1_t) 
     796        term_dontaudit_use_unallocated_ttys($1_t) 
     797        term_dontaudit_use_generic_ptys($1_t) 
    802798        files_dontaudit_read_root_files($1_t) 
    803799') 
    804 optional_policy(`selinuxutil',` 
     800optional_policy(` 
    805801        seutil_sigchld_newrole($1_t) 
    806802') 
    807 optional_policy(`udev',` 
     803optional_policy(` 
    808804        udev_read_db($1_t) 
    809805') 
     
    821817allow $1_t $1_var_run_t:file create_file_perms; 
    822818allow $1_t $1_var_run_t:dir rw_dir_perms; 
    823 files_pid_filetrans($1_t,$1_var_run_t
     819files_pid_filetrans($1_t,$1_var_run_t,file
    824820kernel_read_kernel_sysctls($1_t) 
    825821kernel_list_proc($1_t) 
    826822kernel_read_proc_symlinks($1_t) 
    827823dev_read_sysfs($1_t) 
     824domain_use_interactive_fds($1_t) 
    828825fs_getattr_all_fs($1_t) 
    829826fs_search_auto_mountpoints($1_t) 
    830827term_dontaudit_use_console($1_t) 
    831 domain_use_interactive_fds($1_t) 
    832828init_use_fds($1_t) 
    833 init_use_script_pty($1_t) 
     829init_use_script_ptys($1_t) 
    834830libs_use_ld_so($1_t) 
    835831libs_use_shared_libs($1_t) 
     
    838834userdom_dontaudit_use_unpriv_user_fds($1_t) 
    839835userdom_dontaudit_search_sysadm_home_dirs($1_t) 
    840 ifdef(`targeted_policy',
    841         term_dontaudit_use_unallocated_tty($1_t) 
    842         term_dontaudit_use_generic_pty($1_t) 
     836ifdef(`targeted_policy',
     837        term_dontaudit_use_unallocated_ttys($1_t) 
     838        term_dontaudit_use_generic_ptys($1_t) 
    843839        files_dontaudit_read_root_files($1_t) 
    844840') 
    845 optional_policy(`selinuxutil',` 
     841optional_policy(` 
    846842        seutil_sigchld_newrole($1_t) 
    847843') 
    848 optional_policy(`udev',` 
     844optional_policy(` 
    849845        udev_read_db($1_t) 
    850846') 
     
    10451041') 
    10461042optional_policy(`nscd',` 
    1047         nscd_use_socket($1_t) 
     1043        nscd_socket_use($1_t) 
    10481044') 
    10491045 
     
    10611057files_lock_file($1_lock_t) 
    10621058allow $1_t $1_lock_t:file create_file_perms; 
    1063 files_lock_filetrans($1_t,$1_lock_t
     1059files_lock_filetrans($1_t,$1_lock_t,file
    10641060 
    10651061# 
     
    10691065logging_log_file($1_log_t) 
    10701066allow $1_t $1_log_t:file create_file_perms; 
    1071 logging_log_filetrans($1_t,$1_log_t
     1067logging_log_filetrans($1_t,$1_log_t,file
    10721068 
    10731069# 
     
    12311227allow $1_t $1_var_lib_t:file create_file_perms; 
    12321228allow $1_t $1_var_lib_t:dir rw_dir_perms; 
    1233 files_var_lib_filetrans($1_t,$1_var_lib_t
     1229files_var_lib_filetrans($1_t,$1_var_lib_t,file
    12341230 
    12351231# 
     
    12401236allow $1_t $1_var_run_t:file create_file_perms; 
    12411237allow $1_t $1_var_run_t:dir rw_dir_perms; 
    1242 files_pid_filetrans($1_t,$1_var_run_t
     1238files_pid_filetrans($1_t,$1_var_run_t,file
    12431239 
    12441240# 
  • trunk/tools/buildtest.sh

    r1739 r1817  
    55POLVER="`checkpolicy -V |cut -f 1 -d ' '`" 
    66SETFILES="/usr/sbin/setfiles" 
    7 SE_LINK="/usr/bin/semodule_link" 
     7SE_LINK="time -p /usr/bin/semodule_link" 
    88 
    99die() { 
     
    1515} 
    1616 
    17 cleanup() { 
    18         make bare 
     17cleanup_mon() { 
     18        make MONOLITHIC=y bare 
     19
     20 
     21cleanup_mod() { 
    1922        make MONOLITHIC=n bare 
    2023} 
     
    2326        local OPTS="" 
    2427 
    25         trap cleanup SIGINT SIGQUIT 
    26  
    2728        for i in $TYPES; do 
    2829                # Monolithic tests 
     30                trap cleanup_mon SIGINT SIGQUIT 
    2931                OPTS="TYPE=$i MONOLITHIC=y QUIET=y DIRECT_INITRC=y" 
    3032                [ ! -z "$1" ] && OPTS="$OPTS DISTRO=$1" 
     
    3537                make $OPTS file_contexts || die "$?" "$OPTS" 
    3638                $SETFILES -q -c policy.$POLVER file_contexts || die "$?" "$OPTS" 
    37                 make $OPTS bare || die "$?" "$OPTS" 
     39                cleanup_mon 
    3840 
    3941                # Loadable module tests 
     42                trap cleanup_mod SIGINT SIGQUIT 
    4043                OPTS="TYPE=$i MONOLITHIC=n QUIET=y DIRECT_INITRC=y" 
    4144                [ ! -z "$1" ] && OPTS="$OPTS DISTRO=$1" 
     
    4952                rm dmesg.pp 
    5053                $SE_LINK tmp/base.pp *.pp || die "$?" "$OPTS" 
    51                 make $OPTS bare || die "$?" "$OPTS" 
     54                cleanup_mod 
    5255        done 
    5356} 
    5457 
    55 cleanup 
     58cleanup_mon 
     59cleanup_mod 
    5660do_test 
    5761 
     62for i in $DISTROS; do 
     63        do_test $i 
     64done 
     65 
    5866echo "Completed successfully." 
  • trunk/tools/quicktest.sh

    r1739 r1817  
    44POLVER="`checkpolicy -V |cut -f 1 -d ' '`" 
    55SETFILES="/usr/sbin/setfiles" 
    6 SE_LINK="/usr/bin/semodule_link" 
     6SE_LINK="time -p /usr/bin/semodule_link" 
    77 
    88die() { 
     
    1414} 
    1515 
    16 cleanup() { 
    17         make bare 
     16cleanup_mon() { 
     17        make MONOLITHIC=y bare 
     18
     19 
     20cleanup_mod() { 
    1821        make MONOLITHIC=n bare 
    1922} 
     
    2225        local OPTS="" 
    2326 
    24         trap cleanup SIGINT SIGQUIT 
    25  
    2627        for i in $TYPES; do 
    2728                # Monolithic tests 
     29                trap cleanup_mon SIGINT SIGQUIT 
    2830                OPTS="TYPE=$i MONOLITHIC=y QUIET=y DIRECT_INITRC=y" 
    2931                [ ! -z "$1" ] && OPTS="$OPTS DISTRO=$1" 
     
    3436                make $OPTS file_contexts || die "$?" "$OPTS" 
    3537                $SETFILES -q -c policy.$POLVER file_contexts || die "$?" "$OPTS" 
    36                 make $OPTS bare || die "$?" "$OPTS" 
     38                cleanup_mon 
    3739 
    3840                # Loadable module tests 
     41                trap cleanup_mod SIGINT SIGQUIT 
    3942                OPTS="TYPE=$i MONOLITHIC=n QUIET=y DIRECT_INITRC=y" 
    4043                [ ! -z "$1" ] && OPTS="$OPTS DISTRO=$1" 
     
    4851                rm dmesg.pp 
    4952                $SE_LINK tmp/base.pp *.pp || die "$?" "$OPTS" 
    50                 make $OPTS bare || die "$?" "$OPTS" 
     53                cleanup_mod 
    5154        done 
    5255} 
    5356 
    54 cleanup 
     57cleanup_mon 
     58cleanup_mod 
    5559do_test 
    5660