2005-10-24 01:53:13 +00:00
|
|
|
|
2006-03-07 14:12:39 +00:00
|
|
|
policy_module(rpc,1.2.0)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type exports_t;
|
|
|
|
files_type(exports_t)
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
rpc_domain_template(nfsd)
|
|
|
|
|
|
|
|
type nfsd_rw_t;
|
2005-10-24 18:40:24 +00:00
|
|
|
files_config_file(nfsd_rw_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
|
|
|
type nfsd_ro_t;
|
2005-10-24 18:40:24 +00:00
|
|
|
files_config_file(nfsd_ro_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
|
|
|
type var_lib_nfs_t;
|
2005-10-24 18:40:24 +00:00
|
|
|
files_config_file(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
|
|
|
|
#
|
|
|
|
|
2005-10-24 03:21:26 +00:00
|
|
|
allow rpcd_t self:fifo_file rw_file_perms;
|
|
|
|
allow rpcd_t self:file { getattr read };
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2005-10-27 14:08:47 +00:00
|
|
|
allow rpcd_t rpcd_var_run_t:file manage_file_perms;
|
|
|
|
allow rpcd_t rpcd_var_run_t:dir { rw_dir_perms setattr };
|
2006-03-02 23:41:11 +00:00
|
|
|
files_pid_filetrans(rpcd_t,rpcd_var_run_t,file)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2005-10-24 03:21:26 +00:00
|
|
|
kernel_search_network_state(rpcd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
# for rpc.rquotad
|
2005-10-24 03:21:26 +00:00
|
|
|
kernel_read_sysctl(rpcd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2005-10-27 14:08:47 +00:00
|
|
|
corenet_udp_bind_generic_port(rpcd_t)
|
|
|
|
corenet_udp_bind_reserved_port(rpcd_t)
|
|
|
|
|
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)
|
2005-10-24 03:21:26 +00:00
|
|
|
fs_read_rpc_sockets(rpcd_t)
|
2005-10-27 14:08:47 +00:00
|
|
|
term_use_controlling_term(rpcd_t)
|
|
|
|
|
|
|
|
# cjp: this should really have its own type
|
|
|
|
files_manage_mounttab(rpcd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2005-10-24 03:21:26 +00:00
|
|
|
seutil_dontaudit_search_config(rpcd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
2005-10-27 14:08:47 +00:00
|
|
|
ifdef(`distro_redhat',`
|
2005-10-24 03:21:26 +00:00
|
|
|
allow rpcd_t self:capability { chown dac_override setgid setuid };
|
2005-10-24 01:53:13 +00:00
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nis',`
|
2005-11-08 22:00:30 +00:00
|
|
|
nis_read_ypserv_config(rpcd_t)
|
|
|
|
')
|
|
|
|
|
2005-10-24 01:53:13 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# NFSD local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow nfsd_t self:capability { sys_admin sys_resource };
|
|
|
|
|
|
|
|
allow nfsd_t exports_t:file { getattr read };
|
|
|
|
allow nfsd_t { nfsd_rw_t nfsd_ro_t }:dir r_dir_perms;
|
|
|
|
|
|
|
|
# for /proc/fs/nfs/exports - should we have a new type?
|
|
|
|
kernel_read_system_state(nfsd_t)
|
|
|
|
kernel_read_network_state(nfsd_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
kernel_udp_send(nfsd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
kernel_tcp_recvfrom(nfsd_t)
|
2005-10-27 14:08:47 +00:00
|
|
|
|
|
|
|
corenet_udp_bind_generic_port(nfsd_t)
|
2005-11-10 21:37:54 +00:00
|
|
|
corenet_udp_bind_reserved_port(nfsd_t)
|
2005-10-27 14:08:47 +00:00
|
|
|
|
2005-10-24 01:53:13 +00:00
|
|
|
fs_mount_nfsd_fs(nfsd_t)
|
|
|
|
fs_search_nfsd_fs(nfsd_t)
|
|
|
|
fs_getattr_all_fs(nfsd_t)
|
|
|
|
fs_rw_nfsd_fs(nfsd_t)
|
|
|
|
|
|
|
|
term_use_controlling_term(nfsd_t)
|
|
|
|
|
|
|
|
# does not really need this, but it is easier to just allow it
|
|
|
|
files_search_pids(nfsd_t)
|
|
|
|
# for exportfs and rpc.mountd
|
2006-01-31 19:21:01 +00:00
|
|
|
files_getattr_tmp_dirs(nfsd_t)
|
2005-10-27 14:08:47 +00:00
|
|
|
# cjp: this should really have its own type
|
|
|
|
files_manage_mounttab(rpcd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
|
|
|
tunable_policy(`nfs_export_all_rw',`
|
|
|
|
auth_read_all_dirs_except_shadow(nfsd_t)
|
|
|
|
fs_read_noxattr_fs_files(nfsd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
tunable_policy(`nfs_export_all_ro',`
|
|
|
|
auth_read_all_dirs_except_shadow(nfsd_t)
|
|
|
|
fs_read_noxattr_fs_files(nfsd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# GSSD local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow gssd_t self:capability { dac_override dac_read_search setuid };
|
|
|
|
allow gssd_t self:fifo_file { read write };
|
|
|
|
|
|
|
|
allow gssd_t gssd_tmp_t:dir create_dir_perms;
|
|
|
|
allow gssd_t gssd_tmp_t:file create_file_perms;
|
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
|
|
|
|
|
|
|
kernel_read_network_state(gssd_t)
|
|
|
|
kernel_read_network_state_symlinks(gssd_t)
|
|
|
|
|
2005-11-10 21:37:54 +00:00
|
|
|
corenet_udp_bind_generic_port(gssd_t)
|
|
|
|
corenet_udp_bind_reserved_port(gssd_t)
|
|
|
|
|
2005-10-24 01:53:13 +00:00
|
|
|
dev_read_urand(gssd_t)
|
|
|
|
|
2006-01-31 20:29:27 +00:00
|
|
|
fs_list_rpc(gssd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
fs_read_rpc_sockets(gssd_t)
|
|
|
|
fs_read_rpc_files(gssd_t)
|
|
|
|
|
2005-11-08 22:00:30 +00:00
|
|
|
files_list_tmp(gssd_t)
|
|
|
|
files_read_generic_tmp_files(gssd_t)
|
|
|
|
files_read_generic_tmp_symlinks(gssd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
|
|
|
|
tunable_policy(`allow_gssd_read_tmp',`
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_list_unpriv_users_tmp(gssd_t)
|
|
|
|
userdom_read_unpriv_users_tmp_files(gssd_t)
|
|
|
|
userdom_read_unpriv_users_tmp_symlinks(gssd_t)
|
2005-10-24 01:53:13 +00:00
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`kerberos',`
|
2005-10-24 01:53:13 +00:00
|
|
|
kerberos_use(gssd_t)
|
|
|
|
kerberos_read_keytab(gssd_t)
|
|
|
|
')
|