2010-05-24 19:32:01 +00:00
|
|
|
policy_module(rpc, 1.12.0)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
2007-03-26 18:41:45 +00:00
|
|
|
## <desc>
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
2010-09-24 07:17:22 +00:00
|
|
|
## <p>
|
|
|
|
## Allow gssd to read temp directory. For access to kerberos tgt.
|
|
|
|
## </p>
|
2007-03-26 18:41:45 +00:00
|
|
|
## </desc>
|
2008-07-23 21:38:39 +00:00
|
|
|
gen_tunable(allow_gssd_read_tmp, true)
|
2007-03-26 18:41:45 +00:00
|
|
|
|
|
|
|
## <desc>
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
2010-09-24 07:17:22 +00:00
|
|
|
## <p>
|
|
|
|
## Allow nfs servers to modify public files
|
|
|
|
## used for public file transfer services. Files/Directories must be
|
|
|
|
## labeled public_content_rw_t.
|
|
|
|
## </p>
|
2007-03-26 18:41:45 +00:00
|
|
|
## </desc>
|
2008-07-23 21:38:39 +00:00
|
|
|
gen_tunable(allow_nfsd_anon_write, false)
|
2007-03-26 18:41:45 +00:00
|
|
|
|
2005-10-24 01:53:13 +00:00
|
|
|
type exports_t;
|
2009-07-29 18:55:30 +00:00
|
|
|
files_config_file(exports_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
|
|
|
rpc_domain_template(gssd)
|
|
|
|
|
|
|
|
type gssd_tmp_t;
|
|
|
|
files_tmp_file(gssd_tmp_t)
|
|
|
|
|
2005-10-24 03:21:26 +00:00
|
|
|
type rpcd_var_run_t;
|
|
|
|
files_pid_file(rpcd_var_run_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2005-10-24 03:21:26 +00:00
|
|
|
# rpcd_t is the domain of rpc daemons.
|
2005-10-24 01:53:13 +00:00
|
|
|
# rpc_exec_t is the type of rpc daemon programs.
|
2005-10-24 03:21:26 +00:00
|
|
|
rpc_domain_template(rpcd)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2010-04-05 18:26:21 +00:00
|
|
|
type rpcd_initrc_exec_t;
|
|
|
|
init_script_file(rpcd_initrc_exec_t);
|
|
|
|
|
2005-10-24 01:53:13 +00:00
|
|
|
rpc_domain_template(nfsd)
|
|
|
|
|
2010-04-05 18:26:21 +00:00
|
|
|
type nfsd_initrc_exec_t;
|
|
|
|
init_script_file(nfsd_initrc_exec_t);
|
|
|
|
|
2005-10-24 01:53:13 +00:00
|
|
|
type nfsd_rw_t;
|
2006-06-14 20:52:45 +00:00
|
|
|
files_type(nfsd_rw_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
|
|
|
type nfsd_ro_t;
|
2006-06-14 20:52:45 +00:00
|
|
|
files_type(nfsd_ro_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
|
|
|
type var_lib_nfs_t;
|
2005-11-23 19:02:40 +00:00
|
|
|
files_mountpoint(var_lib_nfs_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# RPC local policy
|
|
|
|
#
|
|
|
|
|
2010-04-05 18:26:21 +00:00
|
|
|
allow rpcd_t self:capability { sys_admin chown dac_override setgid setuid };
|
|
|
|
allow rpcd_t self:process { getcap setcap };
|
2006-12-12 20:08:08 +00:00
|
|
|
allow rpcd_t self:fifo_file rw_fifo_file_perms;
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2010-09-24 07:28:34 +00:00
|
|
|
allow rpcd_t rpcd_var_run_t:dir setattr_dir_perms;
|
2010-08-26 13:41:21 +00:00
|
|
|
manage_dirs_pattern(rpcd_t, rpcd_var_run_t, rpcd_var_run_t)
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(rpcd_t, rpcd_var_run_t, rpcd_var_run_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
files_pid_filetrans(rpcd_t, rpcd_var_run_t, { file dir })
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2008-03-04 19:14:08 +00:00
|
|
|
# rpc.statd executes sm-notify
|
|
|
|
can_exec(rpcd_t, rpcd_exec_t)
|
|
|
|
|
2010-04-05 18:26:21 +00:00
|
|
|
kernel_read_system_state(rpcd_t)
|
2008-08-14 14:19:50 +00:00
|
|
|
kernel_read_network_state(rpcd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
# for rpc.rquotad
|
2008-12-03 18:33:19 +00:00
|
|
|
kernel_read_sysctl(rpcd_t)
|
2008-03-04 19:14:08 +00:00
|
|
|
kernel_rw_fs_sysctls(rpcd_t)
|
2009-03-19 17:56:10 +00:00
|
|
|
kernel_dontaudit_getattr_core_if(rpcd_t)
|
2010-04-05 18:26:21 +00:00
|
|
|
kernel_signal(rpcd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2008-08-14 14:19:50 +00:00
|
|
|
corecmd_exec_bin(rpcd_t)
|
|
|
|
|
|
|
|
files_manage_mounttab(rpcd_t)
|
2009-07-29 18:55:30 +00:00
|
|
|
files_getattr_all_dirs(rpcd_t)
|
2008-08-14 14:19:50 +00:00
|
|
|
|
2006-01-31 20:29:27 +00:00
|
|
|
fs_list_rpc(rpcd_t)
|
2005-10-27 14:08:47 +00:00
|
|
|
fs_read_rpc_files(rpcd_t)
|
|
|
|
fs_read_rpc_symlinks(rpcd_t)
|
2010-04-05 18:26:21 +00:00
|
|
|
fs_rw_rpc_sockets(rpcd_t)
|
|
|
|
fs_get_all_fs_quotas(rpcd_t)
|
2010-09-24 15:55:05 +00:00
|
|
|
fs_set_xattr_fs_quotas(rpcd_t)
|
2010-04-05 18:26:21 +00:00
|
|
|
fs_getattr_all_fs(rpcd_t)
|
2009-07-29 18:55:30 +00:00
|
|
|
|
|
|
|
storage_getattr_fixed_disk_dev(rpcd_t)
|
2005-10-27 14:08:47 +00:00
|
|
|
|
2008-08-14 14:19:50 +00:00
|
|
|
selinux_dontaudit_read_fs(rpcd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2010-09-09 16:14:48 +00:00
|
|
|
miscfiles_read_generic_certs(rpcd_t)
|
2006-05-03 19:58:01 +00:00
|
|
|
|
2005-10-24 03:21:26 +00:00
|
|
|
seutil_dontaudit_search_config(rpcd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
userdom_signal_unpriv_users(rpcd_t)
|
|
|
|
userdom_read_user_home_content_files(rpcd_t)
|
|
|
|
|
2009-07-29 18:55:30 +00:00
|
|
|
optional_policy(`
|
|
|
|
automount_signal(rpcd_t)
|
2010-04-05 18:26:21 +00:00
|
|
|
automount_dontaudit_write_pipes(rpcd_t)
|
2009-07-29 18:55:30 +00:00
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
optional_policy(`
|
|
|
|
domain_unconfined_signal(rpcd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-08 22:00:30 +00:00
|
|
|
nis_read_ypserv_config(rpcd_t)
|
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
optional_policy(`
|
|
|
|
rgmanager_manage_tmp_files(rpcd_t)
|
|
|
|
')
|
|
|
|
|
2005-10-24 01:53:13 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# NFSD local policy
|
|
|
|
#
|
|
|
|
|
2006-05-17 14:50:31 +00:00
|
|
|
allow nfsd_t self:capability { dac_override dac_read_search sys_admin sys_resource };
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2008-10-16 16:09:20 +00:00
|
|
|
allow nfsd_t exports_t:file read_file_perms;
|
2006-12-12 20:08:08 +00:00
|
|
|
allow nfsd_t { nfsd_rw_t nfsd_ro_t }:dir list_dir_perms;
|
2005-10-24 01:53:13 +00:00
|
|
|
|
|
|
|
# for /proc/fs/nfs/exports - should we have a new type?
|
2010-04-05 18:26:21 +00:00
|
|
|
kernel_read_system_state(nfsd_t)
|
|
|
|
kernel_read_network_state(nfsd_t)
|
|
|
|
kernel_dontaudit_getattr_core_if(nfsd_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
kernel_setsched(nfsd_t)
|
2005-10-27 14:08:47 +00:00
|
|
|
|
2006-10-31 21:01:48 +00:00
|
|
|
corenet_tcp_bind_all_rpc_ports(nfsd_t)
|
|
|
|
corenet_udp_bind_all_rpc_ports(nfsd_t)
|
|
|
|
|
2008-08-14 14:19:50 +00:00
|
|
|
dev_dontaudit_getattr_all_blk_files(nfsd_t)
|
|
|
|
dev_dontaudit_getattr_all_chr_files(nfsd_t)
|
|
|
|
dev_rw_lvm_control(nfsd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
|
|
|
# does not really need this, but it is easier to just allow it
|
2010-04-05 18:26:21 +00:00
|
|
|
files_search_pids(nfsd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
# for exportfs and rpc.mountd
|
2010-04-05 18:26:21 +00:00
|
|
|
files_getattr_tmp_dirs(nfsd_t)
|
2005-10-27 14:08:47 +00:00
|
|
|
# cjp: this should really have its own type
|
2009-07-29 18:55:30 +00:00
|
|
|
files_manage_mounttab(nfsd_t)
|
2010-04-05 18:26:21 +00:00
|
|
|
files_read_etc_runtime_files(nfsd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2010-04-05 18:26:21 +00:00
|
|
|
fs_mount_nfsd_fs(nfsd_t)
|
|
|
|
fs_search_nfsd_fs(nfsd_t)
|
|
|
|
fs_getattr_all_fs(nfsd_t)
|
2008-08-14 14:19:50 +00:00
|
|
|
fs_getattr_all_dirs(nfsd_t)
|
2010-04-05 18:26:21 +00:00
|
|
|
fs_rw_nfsd_fs(nfsd_t)
|
2008-08-14 14:19:50 +00:00
|
|
|
|
|
|
|
storage_dontaudit_read_fixed_disk(nfsd_t)
|
2010-04-05 18:26:21 +00:00
|
|
|
storage_raw_read_removable_device(nfsd_t)
|
2008-08-14 14:19:50 +00:00
|
|
|
|
2006-05-19 14:02:24 +00:00
|
|
|
# Read access to public_content_t and public_content_rw_t
|
|
|
|
miscfiles_read_public_files(nfsd_t)
|
|
|
|
|
2010-09-24 07:38:13 +00:00
|
|
|
userdom_user_home_dir_filetrans_user_home_content(nfsd_t, { file dir })
|
|
|
|
|
2006-05-19 14:02:24 +00:00
|
|
|
# Write access to public_content_t and public_content_rw_t
|
|
|
|
tunable_policy(`allow_nfsd_anon_write',`
|
|
|
|
miscfiles_manage_public_files(nfsd_t)
|
2010-04-05 18:26:21 +00:00
|
|
|
')
|
2006-05-19 14:02:24 +00:00
|
|
|
|
2005-10-24 01:53:13 +00:00
|
|
|
tunable_policy(`nfs_export_all_rw',`
|
2009-03-19 17:56:10 +00:00
|
|
|
dev_getattr_all_blk_files(nfsd_t)
|
|
|
|
dev_getattr_all_chr_files(nfsd_t)
|
|
|
|
|
2010-04-05 18:26:21 +00:00
|
|
|
fs_read_noxattr_fs_files(nfsd_t)
|
2006-04-17 17:32:54 +00:00
|
|
|
auth_manage_all_files_except_shadow(nfsd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
tunable_policy(`nfs_export_all_ro',`
|
2009-03-19 17:56:10 +00:00
|
|
|
dev_getattr_all_blk_files(nfsd_t)
|
|
|
|
dev_getattr_all_chr_files(nfsd_t)
|
|
|
|
|
|
|
|
files_getattr_all_pipes(nfsd_t)
|
|
|
|
files_getattr_all_sockets(nfsd_t)
|
|
|
|
|
|
|
|
fs_read_noxattr_fs_files(nfsd_t)
|
|
|
|
|
|
|
|
auth_read_all_dirs_except_shadow(nfsd_t)
|
2006-04-17 17:32:54 +00:00
|
|
|
auth_read_all_files_except_shadow(nfsd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# GSSD local policy
|
|
|
|
#
|
|
|
|
|
2007-03-06 16:18:59 +00:00
|
|
|
allow gssd_t self:capability { dac_override dac_read_search setuid sys_nice };
|
|
|
|
allow gssd_t self:process { getsched setsched };
|
2010-09-24 07:28:34 +00:00
|
|
|
allow gssd_t self:fifo_file rw_fifo_file_perms;
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(gssd_t, gssd_tmp_t, gssd_tmp_t)
|
|
|
|
manage_files_pattern(gssd_t, gssd_tmp_t, gssd_tmp_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans(gssd_t, gssd_tmp_t, { file dir })
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2008-08-14 14:19:50 +00:00
|
|
|
kernel_read_system_state(gssd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
kernel_read_network_state(gssd_t)
|
2010-04-05 18:26:21 +00:00
|
|
|
kernel_read_network_state_symlinks(gssd_t)
|
2010-04-06 13:24:23 +00:00
|
|
|
kernel_request_load_module(gssd_t)
|
2010-04-05 18:26:21 +00:00
|
|
|
kernel_search_network_sysctl(gssd_t)
|
|
|
|
kernel_signal(gssd_t)
|
2007-03-06 16:18:59 +00:00
|
|
|
|
|
|
|
corecmd_exec_bin(gssd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2010-04-05 18:26:21 +00:00
|
|
|
fs_list_rpc(gssd_t)
|
|
|
|
fs_rw_rpc_sockets(gssd_t)
|
|
|
|
fs_read_rpc_files(gssd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2010-04-05 18:26:21 +00:00
|
|
|
fs_list_inotifyfs(gssd_t)
|
|
|
|
files_list_tmp(gssd_t)
|
|
|
|
files_read_usr_symlinks(gssd_t)
|
|
|
|
files_dontaudit_write_var_dirs(gssd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2008-08-14 14:19:50 +00:00
|
|
|
auth_use_nsswitch(gssd_t)
|
2010-04-05 18:26:21 +00:00
|
|
|
auth_manage_cache(gssd_t)
|
2008-08-14 14:19:50 +00:00
|
|
|
|
2010-09-09 16:14:48 +00:00
|
|
|
miscfiles_read_generic_certs(gssd_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
|
2009-07-29 18:55:30 +00:00
|
|
|
mount_signal(gssd_t)
|
|
|
|
|
2010-04-05 18:26:21 +00:00
|
|
|
userdom_signal_all_users(gssd_t)
|
|
|
|
|
2005-10-24 01:53:13 +00:00
|
|
|
tunable_policy(`allow_gssd_read_tmp',`
|
2010-04-05 18:26:21 +00:00
|
|
|
userdom_list_user_tmp(gssd_t)
|
|
|
|
userdom_read_user_tmp_files(gssd_t)
|
|
|
|
userdom_read_user_tmp_symlinks(gssd_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
userdom_write_user_tmp_files(gssd_t)
|
|
|
|
files_read_generic_tmp_files(gssd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
')
|
|
|
|
|
2009-07-29 18:55:30 +00:00
|
|
|
optional_policy(`
|
|
|
|
automount_signal(gssd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2010-04-05 18:26:21 +00:00
|
|
|
kerberos_keytab_template(gssd, gssd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
')
|
2007-03-06 16:18:59 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
pcscd_read_pub_files(gssd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
xserver_rw_xdm_tmp_files(gssd_t)
|
|
|
|
')
|