selinux-policy/policy/modules/admin/sxid.te
Chris PeBenito 1900668638 trunk: Unified labeled networking policy from Paul Moore.
The latest revision of the labeled policy patches which enable both labeled 
and unlabeled policy support for NetLabel.  This revision takes into account
Chris' feedback from the first version and reduces the number of interface
calls in each domain down to two at present: one for unlabeled access, one for
NetLabel access.  The older, transport layer specific interfaces, are still  
present for use by third-party modules but are not used in the default policy
modules.

trunk: Use netmsg initial SID for MLS-only Netlabel packets, from Paul Moore.

This patch changes the policy to use the netmsg initial SID as the "base"
SID/context for NetLabel packets which only have MLS security attributes.
Currently we use the unlabeled initial SID which makes it very difficult to
distinquish between actual unlabeled packets and those packets which have MLS
security attributes.
2007-06-27 15:23:21 +00:00

109 lines
2.4 KiB
Plaintext

policy_module(sxid,1.1.1)
########################################
#
# Declarations
#
type sxid_t;
type sxid_exec_t;
domain_type(sxid_t)
domain_entry_file(sxid_t,sxid_exec_t)
type sxid_log_t;
logging_log_file(sxid_log_t)
type sxid_tmp_t;
files_tmp_file(sxid_tmp_t)
########################################
#
# Local policy
#
allow sxid_t self:capability { dac_override dac_read_search fsetid };
dontaudit sxid_t self:capability { setuid setgid sys_tty_config };
allow sxid_t self:process signal_perms;
allow sxid_t self:fifo_file rw_fifo_file_perms;
allow sxid_t self:tcp_socket create_stream_socket_perms;
allow sxid_t self:udp_socket create_socket_perms;
allow sxid_t sxid_log_t:file manage_file_perms;
logging_log_filetrans(sxid_t,sxid_log_t,file)
manage_dirs_pattern(sxid_t,sxid_tmp_t,sxid_tmp_t)
manage_files_pattern(sxid_t,sxid_tmp_t,sxid_tmp_t)
files_tmp_filetrans(sxid_t, sxid_tmp_t, { file dir })
kernel_read_system_state(sxid_t)
kernel_read_kernel_sysctls(sxid_t)
corecmd_exec_bin(sxid_t)
corecmd_exec_shell(sxid_t)
corenet_all_recvfrom_unlabeled(sxid_t)
corenet_all_recvfrom_netlabel(sxid_t)
corenet_tcp_sendrecv_generic_if(sxid_t)
corenet_udp_sendrecv_generic_if(sxid_t)
corenet_tcp_sendrecv_all_nodes(sxid_t)
corenet_udp_sendrecv_all_nodes(sxid_t)
corenet_tcp_sendrecv_all_ports(sxid_t)
corenet_udp_sendrecv_all_ports(sxid_t)
dev_read_sysfs(sxid_t)
dev_getattr_all_blk_files(sxid_t)
dev_getattr_all_chr_files(sxid_t)
domain_use_interactive_fds(sxid_t)
files_list_all(sxid_t)
files_getattr_all_symlinks(sxid_t)
files_getattr_all_pipes(sxid_t)
files_getattr_all_sockets(sxid_t)
fs_getattr_xattr_fs(sxid_t)
fs_search_auto_mountpoints(sxid_t)
fs_list_all(sxid_t)
term_dontaudit_use_console(sxid_t)
auth_read_all_files_except_shadow(sxid_t)
auth_dontaudit_getattr_shadow(sxid_t)
init_use_fds(sxid_t)
init_use_script_ptys(sxid_t)
libs_use_ld_so(sxid_t)
libs_use_shared_libs(sxid_t)
logging_send_syslog_msg(sxid_t)
miscfiles_read_localization(sxid_t)
mount_exec(sxid_t)
sysnet_read_config(sxid_t)
userdom_dontaudit_use_unpriv_user_fds(sxid_t)
cron_system_entry(sxid_t,sxid_exec_t)
ifdef(`targeted_policy',`
term_dontaudit_use_unallocated_ttys(sxid_t)
term_dontaudit_use_generic_ptys(sxid_t)
files_dontaudit_read_root_files(sxid_t)
')
optional_policy(`
mta_send_mail(sxid_t)
')
optional_policy(`
seutil_sigchld_newrole(sxid_t)
')
optional_policy(`
udev_read_db(sxid_t)
')