2005-09-23 19:38:34 +00:00
|
|
|
|
2006-01-25 15:53:35 +00:00
|
|
|
policy_module(kudzu,1.1.1)
|
2005-09-23 19:38:34 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type kudzu_t;
|
|
|
|
type kudzu_exec_t;
|
|
|
|
init_system_domain(kudzu_t,kudzu_exec_t)
|
|
|
|
|
|
|
|
type kudzu_tmp_t;
|
|
|
|
files_tmp_file(kudzu_tmp_t)
|
|
|
|
|
|
|
|
type kudzu_var_run_t;
|
|
|
|
files_pid_file(kudzu_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow kudzu_t self:capability { dac_override sys_admin sys_rawio net_admin sys_tty_config mknod };
|
|
|
|
dontaudit kudzu_t self:capability sys_tty_config;
|
2006-01-06 22:51:40 +00:00
|
|
|
allow kudzu_t self:process { signal_perms execmem };
|
|
|
|
auditallow kudzu_t self:process execmem;
|
2005-09-23 19:38:34 +00:00
|
|
|
allow kudzu_t self:fifo_file rw_file_perms;
|
|
|
|
allow kudzu_t self:unix_stream_socket { connectto create_stream_socket_perms };
|
|
|
|
allow kudzu_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow kudzu_t self:udp_socket { create ioctl };
|
|
|
|
|
2005-09-23 21:20:03 +00:00
|
|
|
allow kudzu_t kudzu_tmp_t:dir create_file_perms;
|
2005-09-23 19:38:34 +00:00
|
|
|
allow kudzu_t kudzu_tmp_t:{ file chr_file } create_file_perms;
|
2006-01-13 21:06:49 +00:00
|
|
|
files_filetrans_tmp(kudzu_t, kudzu_tmp_t, { file dir chr_file })
|
2005-09-23 19:38:34 +00:00
|
|
|
|
|
|
|
allow kudzu_t kudzu_var_run_t:file create_file_perms;
|
|
|
|
allow kudzu_t kudzu_var_run_t:dir create_dir_perms;
|
2006-01-13 21:06:49 +00:00
|
|
|
files_filetrans_pid(kudzu_t,kudzu_var_run_t)
|
2005-09-23 19:38:34 +00:00
|
|
|
|
|
|
|
kernel_change_ring_buffer_level(kudzu_t)
|
|
|
|
kernel_list_proc(kudzu_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_device_sysctls(kudzu_t)
|
|
|
|
kernel_read_kernel_sysctls(kudzu_t)
|
2005-09-23 19:38:34 +00:00
|
|
|
kernel_read_proc_symlinks(kudzu_t)
|
|
|
|
kernel_read_network_state(kudzu_t)
|
|
|
|
kernel_read_system_state(kudzu_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_rw_hotplug_sysctls(kudzu_t)
|
2005-09-23 19:38:34 +00:00
|
|
|
kernel_rw_kernel_sysctl(kudzu_t)
|
|
|
|
|
|
|
|
bootloader_read_kernel_modules(kudzu_t)
|
|
|
|
|
|
|
|
dev_list_sysfs(kudzu_t)
|
|
|
|
dev_read_usbfs(kudzu_t)
|
|
|
|
dev_read_sysfs(kudzu_t)
|
|
|
|
dev_rx_raw_memory(kudzu_t)
|
|
|
|
dev_wx_raw_memory(kudzu_t)
|
|
|
|
dev_rw_mouse(kudzu_t)
|
2006-01-31 16:08:56 +00:00
|
|
|
dev_rwx_zero(kudzu_t)
|
2005-09-23 19:38:34 +00:00
|
|
|
|
|
|
|
fs_search_auto_mountpoints(kudzu_t)
|
|
|
|
fs_search_ramfs(kudzu_t)
|
2006-01-31 20:29:27 +00:00
|
|
|
fs_write_ramfs_sockets(kudzu_t)
|
2005-09-23 19:38:34 +00:00
|
|
|
|
2006-01-06 22:51:40 +00:00
|
|
|
mls_file_read_up(kudzu_t)
|
2006-01-17 17:50:10 +00:00
|
|
|
mls_file_write_down(kudzu_t)
|
2006-01-06 22:51:40 +00:00
|
|
|
|
2005-09-23 19:38:34 +00:00
|
|
|
modutils_read_mods_deps(kudzu_t)
|
2005-10-14 18:42:42 +00:00
|
|
|
modutils_read_module_conf(kudzu_t)
|
|
|
|
modutils_rename_module_conf(kudzu_t)
|
2005-09-23 19:38:34 +00:00
|
|
|
|
|
|
|
storage_read_scsi_generic(kudzu_t)
|
|
|
|
storage_read_tape_device(kudzu_t)
|
|
|
|
storage_raw_write_fixed_disk(kudzu_t)
|
|
|
|
storage_raw_read_fixed_disk(kudzu_t)
|
2006-01-25 15:53:35 +00:00
|
|
|
storage_raw_read_removable_device(kudzu_t)
|
2005-09-23 19:38:34 +00:00
|
|
|
|
|
|
|
term_search_ptys(kudzu_t)
|
|
|
|
term_dontaudit_use_console(kudzu_t)
|
|
|
|
# so it can write messages to the console
|
|
|
|
term_use_unallocated_tty(kudzu_t)
|
|
|
|
|
|
|
|
corecmd_exec_sbin(kudzu_t)
|
|
|
|
corecmd_exec_bin(kudzu_t)
|
|
|
|
|
|
|
|
domain_exec_all_entry_files(kudzu_t)
|
|
|
|
domain_use_wide_inherit_fd(kudzu_t)
|
|
|
|
|
|
|
|
files_search_var(kudzu_t)
|
|
|
|
files_search_locks(kudzu_t)
|
|
|
|
files_manage_etc_files(kudzu_t)
|
|
|
|
files_manage_etc_runtime_files(kudzu_t)
|
|
|
|
files_manage_mnt_files(kudzu_t)
|
|
|
|
files_manage_mnt_symlinks(kudzu_t)
|
|
|
|
files_dontaudit_search_src(kudzu_t)
|
|
|
|
# Read /usr/share/hwdata/.* and /usr/share/terminfo/l/linux
|
|
|
|
files_read_usr_files(kudzu_t)
|
|
|
|
# for /etc/sysconfig/hwconf - probably need a new type
|
|
|
|
files_rw_etc_runtime_files(kudzu_t)
|
|
|
|
# for file systems that are not yet mounted
|
2006-01-31 19:21:01 +00:00
|
|
|
files_dontaudit_search_isid_type_dirs(kudzu_t)
|
2005-09-23 19:38:34 +00:00
|
|
|
|
|
|
|
init_use_fd(kudzu_t)
|
|
|
|
init_use_script_pty(kudzu_t)
|
|
|
|
init_unix_connect_script(kudzu_t)
|
|
|
|
|
|
|
|
libs_use_ld_so(kudzu_t)
|
|
|
|
libs_use_shared_libs(kudzu_t)
|
|
|
|
# Read /usr/lib/gconv/gconv-modules.*
|
|
|
|
libs_read_lib(kudzu_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(kudzu_t)
|
|
|
|
|
2005-10-13 20:59:36 +00:00
|
|
|
miscfiles_read_hwdata(kudzu_t)
|
2005-09-23 19:38:34 +00:00
|
|
|
miscfiles_read_localization(kudzu_t)
|
|
|
|
|
|
|
|
modutils_read_module_conf(kudzu_t)
|
2005-09-23 21:20:03 +00:00
|
|
|
modutils_domtrans_insmod(kudzu_t)
|
2005-09-23 19:38:34 +00:00
|
|
|
|
|
|
|
sysnet_read_config(kudzu_t)
|
|
|
|
|
|
|
|
userdom_search_sysadm_home_dir(kudzu_t)
|
|
|
|
userdom_dontaudit_use_unpriv_user_fd(kudzu_t)
|
|
|
|
|
|
|
|
ifdef(`targeted_policy',`
|
|
|
|
term_dontaudit_use_unallocated_tty(kudzu_t)
|
|
|
|
term_dontaudit_use_generic_pty(kudzu_t)
|
2006-01-31 19:21:01 +00:00
|
|
|
files_dontaudit_read_root_files(kudzu_t)
|
2005-10-24 15:29:27 +00:00
|
|
|
|
|
|
|
# cjp: this was originally in the else block
|
|
|
|
# of ifdef userhelper.te, but it seems to
|
|
|
|
# make more sense here. also, require
|
|
|
|
# blocks curently do not work in the
|
|
|
|
# else block of optionals
|
|
|
|
unconfined_domain_template(kudzu_t)
|
2005-09-23 19:38:34 +00:00
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`gpm',`
|
2005-09-23 19:38:34 +00:00
|
|
|
gpm_getattr_gpmctl(kudzu_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nscd',`
|
2005-09-23 21:20:03 +00:00
|
|
|
nscd_use_socket(kudzu_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`selinuxutil',`
|
2005-09-23 19:38:34 +00:00
|
|
|
seutil_sigchld_newrole(kudzu_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`udev',`
|
2005-09-23 19:38:34 +00:00
|
|
|
udev_read_db(kudzu_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
ifdef(`TODO',`
|
2005-09-23 21:20:03 +00:00
|
|
|
allow kudzu_t modules_conf_t:file unlink;
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`lpd',`
|
2005-09-23 19:38:34 +00:00
|
|
|
allow kudzu_t printconf_t:file { getattr read };
|
|
|
|
')
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`xserver',`
|
2005-09-23 19:38:34 +00:00
|
|
|
allow kudzu_t xserver_exec_t:file getattr;
|
|
|
|
')
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`rhgb',`
|
2005-09-23 19:38:34 +00:00
|
|
|
allow kudzu_t rhgb_t:unix_stream_socket connectto;
|
|
|
|
')
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`userhelper',`
|
2005-09-23 19:38:34 +00:00
|
|
|
role system_r types sysadm_userhelper_t;
|
|
|
|
domain_auto_trans(kudzu_t, userhelper_exec_t, sysadm_userhelper_t)
|
|
|
|
')
|
|
|
|
allow kudzu_t cupsd_rw_etc_t:dir r_dir_perms;
|
|
|
|
')
|