|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
policy_module(rpc,1.2.9)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Declarations
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type exports_t;
|
|
Chris PeBenito |
17de1b |
files_type(exports_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
rpc_domain_template(gssd)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type gssd_tmp_t;
|
|
Chris PeBenito |
17de1b |
files_tmp_file(gssd_tmp_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type rpcd_var_run_t;
|
|
Chris PeBenito |
17de1b |
files_pid_file(rpcd_var_run_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# rpcd_t is the domain of rpc daemons.
|
|
Chris PeBenito |
17de1b |
# rpc_exec_t is the type of rpc daemon programs.
|
|
Chris PeBenito |
17de1b |
rpc_domain_template(rpcd)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
rpc_domain_template(nfsd)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type nfsd_rw_t;
|
|
Chris PeBenito |
17de1b |
files_type(nfsd_rw_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type nfsd_ro_t;
|
|
Chris PeBenito |
17de1b |
files_type(nfsd_ro_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type var_lib_nfs_t;
|
|
Chris PeBenito |
17de1b |
files_mountpoint(var_lib_nfs_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# RPC local policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow rpcd_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
17de1b |
allow rpcd_t self:file { getattr read };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow rpcd_t rpcd_var_run_t:file manage_file_perms;
|
|
Chris PeBenito |
17de1b |
allow rpcd_t rpcd_var_run_t:dir { rw_dir_perms setattr };
|
|
Chris PeBenito |
17de1b |
files_pid_filetrans(rpcd_t,rpcd_var_run_t,file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
kernel_search_network_state(rpcd_t)
|
|
Chris PeBenito |
17de1b |
# for rpc.rquotad
|
|
Chris PeBenito |
17de1b |
kernel_read_sysctl(rpcd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dev_read_urand(rpcd_t)
|
|
Chris PeBenito |
17de1b |
dev_read_rand(rpcd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
fs_list_rpc(rpcd_t)
|
|
Chris PeBenito |
17de1b |
fs_read_rpc_files(rpcd_t)
|
|
Chris PeBenito |
17de1b |
fs_read_rpc_symlinks(rpcd_t)
|
|
Chris PeBenito |
17de1b |
fs_read_rpc_sockets(rpcd_t)
|
|
Chris PeBenito |
17de1b |
term_use_controlling_term(rpcd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# cjp: this should really have its own type
|
|
Chris PeBenito |
17de1b |
files_manage_mounttab(rpcd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
miscfiles_read_certs(rpcd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
seutil_dontaudit_search_config(rpcd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
portmap_udp_chat(rpcd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
ifdef(`distro_redhat',`
|
|
Chris PeBenito |
17de1b |
allow rpcd_t self:capability { chown dac_override setgid setuid };
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
nis_read_ypserv_config(rpcd_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# NFSD local policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow nfsd_t self:capability { dac_override dac_read_search sys_admin sys_resource };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow nfsd_t exports_t:file { getattr read };
|
|
Chris PeBenito |
17de1b |
allow nfsd_t { nfsd_rw_t nfsd_ro_t }:dir r_dir_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# for /proc/fs/nfs/exports - should we have a new type?
|
|
Chris PeBenito |
17de1b |
kernel_read_system_state(nfsd_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_network_state(nfsd_t)
|
|
Chris PeBenito |
17de1b |
kernel_udp_send(nfsd_t)
|
|
Chris PeBenito |
17de1b |
kernel_tcp_recvfrom(nfsd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
fs_mount_nfsd_fs(nfsd_t)
|
|
Chris PeBenito |
17de1b |
fs_search_nfsd_fs(nfsd_t)
|
|
Chris PeBenito |
17de1b |
fs_getattr_all_fs(nfsd_t)
|
|
Chris PeBenito |
17de1b |
fs_rw_nfsd_fs(nfsd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
term_use_controlling_term(nfsd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# does not really need this, but it is easier to just allow it
|
|
Chris PeBenito |
17de1b |
files_search_pids(nfsd_t)
|
|
Chris PeBenito |
17de1b |
# for exportfs and rpc.mountd
|
|
Chris PeBenito |
17de1b |
files_getattr_tmp_dirs(nfsd_t)
|
|
Chris PeBenito |
17de1b |
# cjp: this should really have its own type
|
|
Chris PeBenito |
17de1b |
files_manage_mounttab(rpcd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Read access to public_content_t and public_content_rw_t
|
|
Chris PeBenito |
17de1b |
miscfiles_read_public_files(nfsd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
portmap_tcp_connect(nfsd_t)
|
|
Chris PeBenito |
17de1b |
portmap_udp_chat(nfsd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Write access to public_content_t and public_content_rw_t
|
|
Chris PeBenito |
17de1b |
tunable_policy(`allow_nfsd_anon_write',`
|
|
Chris PeBenito |
17de1b |
miscfiles_manage_public_files(nfsd_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
tunable_policy(`nfs_export_all_rw',`
|
|
Chris PeBenito |
17de1b |
fs_read_noxattr_fs_files(nfsd_t)
|
|
Chris PeBenito |
17de1b |
auth_manage_all_files_except_shadow(nfsd_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
tunable_policy(`nfs_export_all_ro',`
|
|
Chris PeBenito |
17de1b |
fs_read_noxattr_fs_files(nfsd_t)
|
|
Chris PeBenito |
17de1b |
auth_read_all_files_except_shadow(nfsd_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# GSSD local policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow gssd_t self:capability { dac_override dac_read_search setuid };
|
|
Chris PeBenito |
17de1b |
allow gssd_t self:fifo_file { read write };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow gssd_t gssd_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
17de1b |
allow gssd_t gssd_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
17de1b |
files_tmp_filetrans(gssd_t, gssd_tmp_t, { file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
kernel_read_network_state(gssd_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_network_state_symlinks(gssd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dev_read_urand(gssd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
fs_list_rpc(gssd_t)
|
|
Chris PeBenito |
17de1b |
fs_read_rpc_sockets(gssd_t)
|
|
Chris PeBenito |
17de1b |
fs_read_rpc_files(gssd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_list_tmp(gssd_t)
|
|
Chris PeBenito |
17de1b |
files_read_generic_tmp_files(gssd_t)
|
|
Chris PeBenito |
17de1b |
files_read_generic_tmp_symlinks(gssd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
tunable_policy(`allow_gssd_read_tmp',`
|
|
Chris PeBenito |
17de1b |
userdom_list_unpriv_users_tmp(gssd_t)
|
|
Chris PeBenito |
17de1b |
userdom_read_unpriv_users_tmp_files(gssd_t)
|
|
Chris PeBenito |
17de1b |
userdom_read_unpriv_users_tmp_symlinks(gssd_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
kerberos_use(gssd_t)
|
|
Chris PeBenito |
17de1b |
kerberos_read_keytab(gssd_t)
|
|
Chris PeBenito |
17de1b |
')
|