From 3411c3c35d4fc67af2eafc27f16bbab20fa4215d Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Apr 05 2006 19:31:34 +0000 Subject: add pxe, bug 1540 --- diff --git a/refpolicy/Changelog b/refpolicy/Changelog index 3225f36..aa38ecc 100644 --- a/refpolicy/Changelog +++ b/refpolicy/Changelog @@ -41,6 +41,7 @@ mozilla mplayer postgrey + pxe qmail (Petre Rodan) rhgb snort diff --git a/refpolicy/policy/modules/services/pxe.fc b/refpolicy/policy/modules/services/pxe.fc new file mode 100644 index 0000000..44b3a0c --- /dev/null +++ b/refpolicy/policy/modules/services/pxe.fc @@ -0,0 +1,6 @@ + +/usr/sbin/pxe -- gen_context(system_u:object_r:pxe_exec_t,s0) + +/var/log/pxe\.log -- gen_context(system_u:object_r:pxe_log_t,s0) + +/var/run/pxe\.pid -- gen_context(system_u:object_r:pxe_var_run_t,s0) diff --git a/refpolicy/policy/modules/services/pxe.if b/refpolicy/policy/modules/services/pxe.if new file mode 100644 index 0000000..d3d6a6b --- /dev/null +++ b/refpolicy/policy/modules/services/pxe.if @@ -0,0 +1 @@ +## Server for the PXE network boot protocol diff --git a/refpolicy/policy/modules/services/pxe.te b/refpolicy/policy/modules/services/pxe.te new file mode 100644 index 0000000..d992e7d --- /dev/null +++ b/refpolicy/policy/modules/services/pxe.te @@ -0,0 +1,79 @@ + +policy_module(pxe,1.0.0) + +# cjp: policy seems incomplete + +######################################## +# +# Declarations +# + +type pxe_t; +type pxe_exec_t; +init_daemon_domain(pxe_t,pxe_exec_t) + +type pxe_log_t; +logging_log_file(pxe_log_t) + +type pxe_var_run_t; +files_pid_file(pxe_var_run_t) + +######################################## +# +# Local policy +# + +allow pxe_t self:capability { chown setgid setuid }; +dontaudit pxe_t self:capability sys_tty_config; +allow pxe_t self:process signal_perms; + +allow pxe_t pxe_log_t:file create_file_perms; +logging_log_filetrans(pxe_t,pxe_log_t,file) + +allow pxe_t pxe_var_run_t:file create_file_perms; +allow pxe_t pxe_var_run_t:dir rw_dir_perms; +files_pid_filetrans(pxe_t,pxe_var_run_t,file) + +kernel_read_kernel_sysctls(pxe_t) +kernel_list_proc(pxe_t) +kernel_read_proc_symlinks(pxe_t) + +corenet_udp_bind_pxe_port(pxe_t) + +dev_read_sysfs(pxe_t) + +domain_use_interactive_fds(pxe_t) + +files_read_etc_files(pxe_t) + +fs_getattr_all_fs(pxe_t) +fs_search_auto_mountpoints(pxe_t) + +term_dontaudit_use_console(pxe_t) + +init_use_fds(pxe_t) +init_use_script_ptys(pxe_t) + +libs_use_ld_so(pxe_t) +libs_use_shared_libs(pxe_t) + +logging_send_syslog_msg(pxe_t) + +miscfiles_read_localization(pxe_t) + +userdom_dontaudit_use_unpriv_user_fds(pxe_t) +userdom_dontaudit_search_sysadm_home_dirs(pxe_t) + +ifdef(`targeted_policy',` + term_dontaudit_use_unallocated_ttys(pxe_t) + term_dontaudit_use_generic_ptys(pxe_t) + files_dontaudit_read_root_files(pxe_t) +') + +optional_policy(` + seutil_sigchld_newrole(pxe_t) +') + +optional_policy(` + udev_read_db(pxe_t) +')