Rpc patch from Dan Walsh.
This commit is contained in:
parent
20fa703294
commit
372acd0037
@ -2,6 +2,9 @@
|
||||
# /etc
|
||||
#
|
||||
/etc/exports -- gen_context(system_u:object_r:exports_t,s0)
|
||||
/etc/rc\.d/init\.d/nfs -- gen_context(system_u:object_r:nfsd_initrc_exec_t,s0)
|
||||
/etc/rc\.d/init\.d/nfslock -- gen_context(system_u:object_r:rpcd_initrc_exec_t,s0)
|
||||
/etc/rc\.d/init\.d/rpcidmapd -- gen_context(system_u:object_r:rpcd_initrc_exec_t,s0)
|
||||
|
||||
#
|
||||
# /sbin
|
||||
|
@ -99,6 +99,7 @@ template(`rpc_domain_template', `
|
||||
files_read_etc_runtime_files($1_t)
|
||||
files_search_var($1_t)
|
||||
files_search_var_lib($1_t)
|
||||
files_list_home($1_t)
|
||||
|
||||
auth_use_nsswitch($1_t)
|
||||
|
||||
@ -108,6 +109,10 @@ template(`rpc_domain_template', `
|
||||
|
||||
userdom_dontaudit_use_unpriv_user_fds($1_t)
|
||||
|
||||
optional_policy(`
|
||||
rpcbind_stream_connect($1_t)
|
||||
')
|
||||
|
||||
optional_policy(`
|
||||
seutil_sigchld_newrole($1_t)
|
||||
')
|
||||
@ -204,12 +209,30 @@ interface(`rpc_domtrans_nfsd',`
|
||||
domtrans_pattern($1, nfsd_exec_t, nfsd_t)
|
||||
')
|
||||
|
||||
########################################
|
||||
#######################################
|
||||
## <summary>
|
||||
## Execute domain in nfsd domain.
|
||||
## </summary>
|
||||
## <param name="domain">
|
||||
## <summary>
|
||||
## Domain allowed access.
|
||||
## </summary>
|
||||
## </param>
|
||||
#
|
||||
interface(`rpc_initrc_domtrans_nfsd',`
|
||||
gen_require(`
|
||||
type nfsd_initrc_exec_t;
|
||||
')
|
||||
|
||||
init_labeled_script_domtrans($1, nfsd_initrc_exec_t)
|
||||
')
|
||||
|
||||
########################################
|
||||
## <summary>
|
||||
## Execute domain in rpcd domain.
|
||||
## </summary>
|
||||
## <param name="domain">
|
||||
## <summary>
|
||||
## The type of the process performing this action.
|
||||
## </summary>
|
||||
## </param>
|
||||
@ -223,6 +246,24 @@ interface(`rpc_domtrans_rpcd',`
|
||||
allow rpcd_t $1:process signal;
|
||||
')
|
||||
|
||||
#######################################
|
||||
## <summary>
|
||||
## Execute domain in rpcd domain.
|
||||
## </summary>
|
||||
## <param name="domain">
|
||||
## <summary>
|
||||
## Domain allowed access.
|
||||
## </summary>
|
||||
## </param>
|
||||
#
|
||||
interface(`rpc_initrc_domtrans_rpcd',`
|
||||
gen_require(`
|
||||
type rpcd_initrc_exec_t;
|
||||
')
|
||||
|
||||
init_labeled_script_domtrans($1, rpcd_initrc_exec_t)
|
||||
')
|
||||
|
||||
########################################
|
||||
## <summary>
|
||||
## Read NFS exported content.
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
policy_module(rpc, 1.11.0)
|
||||
policy_module(rpc, 1.11.1)
|
||||
|
||||
########################################
|
||||
#
|
||||
@ -37,8 +37,14 @@ files_pid_file(rpcd_var_run_t)
|
||||
# rpc_exec_t is the type of rpc daemon programs.
|
||||
rpc_domain_template(rpcd)
|
||||
|
||||
type rpcd_initrc_exec_t;
|
||||
init_script_file(rpcd_initrc_exec_t);
|
||||
|
||||
rpc_domain_template(nfsd)
|
||||
|
||||
type nfsd_initrc_exec_t;
|
||||
init_script_file(nfsd_initrc_exec_t);
|
||||
|
||||
type nfsd_rw_t;
|
||||
files_type(nfsd_rw_t)
|
||||
|
||||
@ -53,7 +59,8 @@ files_mountpoint(var_lib_nfs_t)
|
||||
# RPC local policy
|
||||
#
|
||||
|
||||
allow rpcd_t self:capability { chown dac_override setgid setuid };
|
||||
allow rpcd_t self:capability { sys_admin chown dac_override setgid setuid };
|
||||
allow rpcd_t self:process { getcap setcap };
|
||||
allow rpcd_t self:fifo_file rw_fifo_file_perms;
|
||||
|
||||
allow rpcd_t rpcd_var_run_t:dir setattr;
|
||||
@ -67,6 +74,7 @@ kernel_read_system_state(rpcd_t)
|
||||
kernel_read_network_state(rpcd_t)
|
||||
# for rpc.rquotad
|
||||
kernel_read_sysctl(rpcd_t)
|
||||
kernel_request_load_module(gssd_t)
|
||||
kernel_rw_fs_sysctls(rpcd_t)
|
||||
kernel_dontaudit_getattr_core_if(rpcd_t)
|
||||
kernel_signal(rpcd_t)
|
||||
@ -93,6 +101,7 @@ seutil_dontaudit_search_config(rpcd_t)
|
||||
|
||||
optional_policy(`
|
||||
automount_signal(rpcd_t)
|
||||
automount_dontaudit_write_pipes(rpcd_t)
|
||||
')
|
||||
|
||||
optional_policy(`
|
||||
@ -127,6 +136,7 @@ files_search_pids(nfsd_t)
|
||||
files_getattr_tmp_dirs(nfsd_t)
|
||||
# cjp: this should really have its own type
|
||||
files_manage_mounttab(nfsd_t)
|
||||
files_read_etc_runtime_files(nfsd_t)
|
||||
|
||||
fs_mount_nfsd_fs(nfsd_t)
|
||||
fs_search_nfsd_fs(nfsd_t)
|
||||
@ -135,6 +145,7 @@ fs_getattr_all_dirs(nfsd_t)
|
||||
fs_rw_nfsd_fs(nfsd_t)
|
||||
|
||||
storage_dontaudit_read_fixed_disk(nfsd_t)
|
||||
storage_raw_read_removable_device(nfsd_t)
|
||||
|
||||
# Read access to public_content_t and public_content_rw_t
|
||||
miscfiles_read_public_files(nfsd_t)
|
||||
@ -182,6 +193,7 @@ kernel_read_system_state(gssd_t)
|
||||
kernel_read_network_state(gssd_t)
|
||||
kernel_read_network_state_symlinks(gssd_t)
|
||||
kernel_search_network_sysctl(gssd_t)
|
||||
kernel_signal(gssd_t)
|
||||
|
||||
corecmd_exec_bin(gssd_t)
|
||||
|
||||
@ -189,8 +201,10 @@ fs_list_rpc(gssd_t)
|
||||
fs_rw_rpc_sockets(gssd_t)
|
||||
fs_read_rpc_files(gssd_t)
|
||||
|
||||
fs_list_inotifyfs(gssd_t)
|
||||
files_list_tmp(gssd_t)
|
||||
files_read_usr_symlinks(gssd_t)
|
||||
files_dontaudit_write_var_dirs(gssd_t)
|
||||
|
||||
auth_use_nsswitch(gssd_t)
|
||||
auth_manage_cache(gssd_t)
|
||||
@ -199,6 +213,8 @@ miscfiles_read_certs(gssd_t)
|
||||
|
||||
mount_signal(gssd_t)
|
||||
|
||||
userdom_signal_all_users(gssd_t)
|
||||
|
||||
tunable_policy(`allow_gssd_read_tmp',`
|
||||
userdom_list_user_tmp(gssd_t)
|
||||
userdom_read_user_tmp_files(gssd_t)
|
||||
|
Loading…
Reference in New Issue
Block a user