|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
f35fed |
policy_module(rpc,1.2.9)
|
|
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 |
b68a85 |
files_type(nfsd_rw_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
type nfsd_ro_t;
|
|
Chris PeBenito |
b68a85 |
files_type(nfsd_ro_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
type var_lib_nfs_t;
|
|
Chris PeBenito |
af2345 |
files_mountpoint(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 |
ce0383 |
allow rpcd_t rpcd_var_run_t:file manage_file_perms;
|
|
Chris PeBenito |
ce0383 |
allow rpcd_t rpcd_var_run_t:dir { rw_dir_perms setattr };
|
|
Chris PeBenito |
1c1ac6 |
files_pid_filetrans(rpcd_t,rpcd_var_run_t,file)
|
|
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 |
e99359 |
dev_read_urand(rpcd_t)
|
|
Chris PeBenito |
e99359 |
dev_read_rand(rpcd_t)
|
|
Chris PeBenito |
e99359 |
|
|
Chris PeBenito |
4d851f |
fs_list_rpc(rpcd_t)
|
|
Chris PeBenito |
ce0383 |
fs_read_rpc_files(rpcd_t)
|
|
Chris PeBenito |
ce0383 |
fs_read_rpc_symlinks(rpcd_t)
|
|
Chris PeBenito |
19b555 |
fs_read_rpc_sockets(rpcd_t)
|
|
Chris PeBenito |
ce0383 |
term_use_controlling_term(rpcd_t)
|
|
Chris PeBenito |
ce0383 |
|
|
Chris PeBenito |
ce0383 |
# cjp: this should really have its own type
|
|
Chris PeBenito |
ce0383 |
files_manage_mounttab(rpcd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
e99359 |
miscfiles_read_certs(rpcd_t)
|
|
Chris PeBenito |
e99359 |
|
|
Chris PeBenito |
19b555 |
seutil_dontaudit_search_config(rpcd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
e78c77 |
portmap_udp_chat(rpcd_t)
|
|
Chris PeBenito |
e78c77 |
|
|
Chris PeBenito |
ce0383 |
ifdef(`distro_redhat',`
|
|
Chris PeBenito |
19b555 |
allow rpcd_t self:capability { chown dac_override setgid setuid };
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
725926 |
nis_read_ypserv_config(rpcd_t)
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
725926 |
|
|
Chris PeBenito |
43989f |
########################################
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
43989f |
# NFSD local policy
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
165b42 |
allow nfsd_t self:capability { dac_override dac_read_search 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 |
1c1ac6 |
kernel_udp_send(nfsd_t)
|
|
Chris PeBenito |
43989f |
kernel_tcp_recvfrom(nfsd_t)
|
|
Chris PeBenito |
ce0383 |
|
|
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 |
9e04f5 |
files_getattr_tmp_dirs(nfsd_t)
|
|
Chris PeBenito |
ce0383 |
# cjp: this should really have its own type
|
|
Chris PeBenito |
ce0383 |
files_manage_mounttab(rpcd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
87eb5c |
# Read access to public_content_t and public_content_rw_t
|
|
Chris PeBenito |
87eb5c |
miscfiles_read_public_files(nfsd_t)
|
|
Chris PeBenito |
87eb5c |
|
|
Chris PeBenito |
e78c77 |
portmap_tcp_connect(nfsd_t)
|
|
Chris PeBenito |
e78c77 |
portmap_udp_chat(nfsd_t)
|
|
Chris PeBenito |
e78c77 |
|
|
Chris PeBenito |
87eb5c |
# Write access to public_content_t and public_content_rw_t
|
|
Chris PeBenito |
87eb5c |
tunable_policy(`allow_nfsd_anon_write',`
|
|
Chris PeBenito |
87eb5c |
miscfiles_manage_public_files(nfsd_t)
|
|
Chris PeBenito |
87eb5c |
')
|
|
Chris PeBenito |
87eb5c |
|
|
Chris PeBenito |
43989f |
tunable_policy(`nfs_export_all_rw',`
|
|
Chris PeBenito |
43989f |
fs_read_noxattr_fs_files(nfsd_t)
|
|
Chris PeBenito |
cdc86e |
auth_manage_all_files_except_shadow(nfsd_t)
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
tunable_policy(`nfs_export_all_ro',`
|
|
Chris PeBenito |
43989f |
fs_read_noxattr_fs_files(nfsd_t)
|
|
Chris PeBenito |
cdc86e |
auth_read_all_files_except_shadow(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 |
103fe2 |
files_tmp_filetrans(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 |
4d851f |
fs_list_rpc(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 |
725926 |
files_list_tmp(gssd_t)
|
|
Chris PeBenito |
725926 |
files_read_generic_tmp_files(gssd_t)
|
|
Chris PeBenito |
725926 |
files_read_generic_tmp_symlinks(gssd_t)
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
tunable_policy(`allow_gssd_read_tmp',`
|
|
Chris PeBenito |
15722e |
userdom_list_unpriv_users_tmp(gssd_t)
|
|
Chris PeBenito |
15722e |
userdom_read_unpriv_users_tmp_files(gssd_t)
|
|
Chris PeBenito |
15722e |
userdom_read_unpriv_users_tmp_symlinks(gssd_t)
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
43989f |
kerberos_use(gssd_t)
|
|
Chris PeBenito |
43989f |
kerberos_read_keytab(gssd_t)
|
|
Chris PeBenito |
43989f |
')
|