|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
policy_module(rpc,1.0)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
########################################
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
43989f |
# Declarations
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
type exports_t;
|
|
Chris PeBenito |
43989f |
files_type(exports_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
rpc_domain_template(gssd)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
type gssd_tmp_t;
|
|
Chris PeBenito |
43989f |
files_tmp_file(gssd_tmp_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
19b555 |
type rpcd_var_run_t;
|
|
Chris PeBenito |
19b555 |
files_pid_file(rpcd_var_run_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
19b555 |
# rpcd_t is the domain of rpc daemons.
|
|
Chris PeBenito |
43989f |
# rpc_exec_t is the type of rpc daemon programs.
|
|
Chris PeBenito |
19b555 |
rpc_domain_template(rpcd)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
rpc_domain_template(nfsd)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
type nfsd_rw_t;
|
|
Chris PeBenito |
9bbc75 |
files_config_file(nfsd_rw_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
type nfsd_ro_t;
|
|
Chris PeBenito |
9bbc75 |
files_config_file(nfsd_ro_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
type var_lib_nfs_t;
|
|
Chris PeBenito |
9bbc75 |
files_config_file(var_lib_nfs_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
########################################
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
43989f |
# RPC local policy
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
19b555 |
allow rpcd_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
19b555 |
allow rpcd_t self:file { getattr read };
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
dontaudit userdomain exports_t:file getattr;
|
|
Chris PeBenito |
19b555 |
allow rpcd_t rpcd_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
19b555 |
allow rpcd_t rpcd_var_run_t:dir create_dir_perms;
|
|
Chris PeBenito |
19b555 |
allow rpcd_t rpcd_var_run_t:dir setattr;
|
|
Chris PeBenito |
19b555 |
files_create_pid(rpcd_t,rpcd_var_run_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
19b555 |
kernel_search_network_state(rpcd_t)
|
|
Chris PeBenito |
43989f |
# for rpc.rquotad
|
|
Chris PeBenito |
19b555 |
kernel_read_sysctl(rpcd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
19b555 |
fs_read_rpc_dirs(rpcd_t)
|
|
Chris PeBenito |
19b555 |
fs_read_rpc_files(rpcd_t)
|
|
Chris PeBenito |
19b555 |
fs_read_rpc_symlinks(rpcd_t)
|
|
Chris PeBenito |
19b555 |
fs_read_rpc_sockets(rpcd_t)
|
|
Chris PeBenito |
19b555 |
term_use_controlling_term(rpcd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
19b555 |
seutil_dontaudit_search_config(rpcd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
19b555 |
# rpcd_t needs to talk to the portmap_t domain
|
|
Chris PeBenito |
19b555 |
portmap_udp_sendrecv(rpcd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
ifdef(`distro_redhat', `
|
|
Chris PeBenito |
19b555 |
allow rpcd_t self:capability { chown dac_override setgid setuid };
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
########################################
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
43989f |
# NFSD local policy
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
allow nfsd_t self:capability { sys_admin sys_resource };
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
allow nfsd_t exports_t:file { getattr read };
|
|
Chris PeBenito |
43989f |
allow nfsd_t { nfsd_rw_t nfsd_ro_t }:dir r_dir_perms;
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
# for /proc/fs/nfs/exports - should we have a new type?
|
|
Chris PeBenito |
43989f |
kernel_read_system_state(nfsd_t)
|
|
Chris PeBenito |
43989f |
kernel_read_network_state(nfsd_t)
|
|
Chris PeBenito |
43989f |
kernel_udp_sendfrom(nfsd_t)
|
|
Chris PeBenito |
43989f |
kernel_tcp_recvfrom(nfsd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
fs_mount_nfsd_fs(nfsd_t)
|
|
Chris PeBenito |
43989f |
fs_search_nfsd_fs(nfsd_t)
|
|
Chris PeBenito |
43989f |
fs_getattr_all_fs(nfsd_t)
|
|
Chris PeBenito |
43989f |
fs_rw_nfsd_fs(nfsd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
term_use_controlling_term(nfsd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
# does not really need this, but it is easier to just allow it
|
|
Chris PeBenito |
43989f |
files_search_pids(nfsd_t)
|
|
Chris PeBenito |
43989f |
# for exportfs and rpc.mountd
|
|
Chris PeBenito |
43989f |
files_getattr_tmp_dir(nfsd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
portmap_tcp_connect(nfsd_t)
|
|
Chris PeBenito |
43989f |
portmap_udp_sendrecv(nfsd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
tunable_policy(`nfs_export_all_rw',`
|
|
Chris PeBenito |
43989f |
auth_read_all_dirs_except_shadow(nfsd_t)
|
|
Chris PeBenito |
43989f |
fs_read_noxattr_fs_files(nfsd_t)
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
tunable_policy(`nfs_export_all_ro',`
|
|
Chris PeBenito |
43989f |
auth_read_all_dirs_except_shadow(nfsd_t)
|
|
Chris PeBenito |
43989f |
fs_read_noxattr_fs_files(nfsd_t)
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
########################################
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
43989f |
# GSSD local policy
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
allow gssd_t self:capability { dac_override dac_read_search setuid };
|
|
Chris PeBenito |
43989f |
allow gssd_t self:fifo_file { read write };
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
allow gssd_t gssd_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
43989f |
allow gssd_t gssd_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
43989f |
files_create_tmp_files(gssd_t, gssd_tmp_t, { file dir })
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
kernel_read_network_state(gssd_t)
|
|
Chris PeBenito |
43989f |
kernel_read_network_state_symlinks(gssd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
dev_read_urand(gssd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
fs_read_rpc_dirs(gssd_t)
|
|
Chris PeBenito |
43989f |
fs_read_rpc_sockets(gssd_t)
|
|
Chris PeBenito |
43989f |
fs_read_rpc_files(gssd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
files_read_tmp(gssd_t)
|
|
Chris PeBenito |
43989f |
files_read_tmp_files(gssd_t)
|
|
Chris PeBenito |
43989f |
files_read_tmp_symlinks(gssd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
tunable_policy(`allow_gssd_read_tmp',`
|
|
Chris PeBenito |
43989f |
userdom_list_unpriv_user_tmp(gssd_t)
|
|
Chris PeBenito |
43989f |
userdom_read_unpriv_user_tmp_files(gssd_t)
|
|
Chris PeBenito |
43989f |
userdom_read_unpriv_user_tmp_symlinks(gssd_t)
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
optional_policy(`kerberos.te',`
|
|
Chris PeBenito |
43989f |
kerberos_use(gssd_t)
|
|
Chris PeBenito |
43989f |
kerberos_read_keytab(gssd_t)
|
|
Chris PeBenito |
43989f |
')
|