|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
8bf6f5 |
policy_module(usermanage,1.3.5)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
########################################
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
# Declarations
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
type admin_passwd_exec_t;
|
|
Chris PeBenito |
8fd367 |
files_type(admin_passwd_exec_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
a1f94a |
type chfn_t;
|
|
Chris PeBenito |
1815ba |
domain_obj_id_change_exemption(chfn_t)
|
|
Chris PeBenito |
c9428d |
domain_type(chfn_t)
|
|
Chris PeBenito |
849380 |
role system_r types chfn_t;
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
type chfn_exec_t;
|
|
Chris PeBenito |
c9428d |
domain_entry_file(chfn_t,chfn_exec_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
type crack_t;
|
|
Chris PeBenito |
9d3bdc |
domain_type(crack_t)
|
|
Chris PeBenito |
849380 |
role system_r types crack_t;
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
type crack_exec_t;
|
|
Chris PeBenito |
c9428d |
domain_entry_file(crack_t,crack_exec_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
9bbc75 |
type crack_db_t;
|
|
Chris PeBenito |
9bbc75 |
files_config_file(crack_db_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
type crack_tmp_t;
|
|
Chris PeBenito |
c9428d |
files_tmp_file(crack_tmp_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
493d6c |
type groupadd_t;
|
|
Chris PeBenito |
849380 |
type groupadd_exec_t;
|
|
Chris PeBenito |
1815ba |
domain_obj_id_change_exemption(groupadd_t)
|
|
Chris PeBenito |
c9428d |
init_system_domain(groupadd_t,groupadd_exec_t)
|
|
Chris PeBenito |
bbd6a6 |
role system_r types groupadd_t;
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
a1f94a |
type passwd_t;
|
|
Chris PeBenito |
1815ba |
domain_obj_id_change_exemption(passwd_t)
|
|
Chris PeBenito |
c9428d |
domain_type(passwd_t)
|
|
Chris PeBenito |
849380 |
role system_r types passwd_t;
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
type passwd_exec_t;
|
|
Chris PeBenito |
c9428d |
domain_entry_file(passwd_t,passwd_exec_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
a1f94a |
type sysadm_passwd_t;
|
|
Chris PeBenito |
1815ba |
domain_obj_id_change_exemption(sysadm_passwd_t)
|
|
Chris PeBenito |
c9428d |
domain_type(sysadm_passwd_t)
|
|
Chris PeBenito |
c9428d |
domain_entry_file(sysadm_passwd_t,admin_passwd_exec_t)
|
|
Chris PeBenito |
daff1d |
role system_r types sysadm_passwd_t;
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
type sysadm_passwd_tmp_t;
|
|
Chris PeBenito |
7a6d42 |
files_tmp_file(sysadm_passwd_tmp_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
493d6c |
type useradd_t;
|
|
Chris PeBenito |
849380 |
type useradd_exec_t;
|
|
Chris PeBenito |
1815ba |
domain_obj_id_change_exemption(useradd_t)
|
|
Chris PeBenito |
c9428d |
init_system_domain(useradd_t,useradd_exec_t)
|
|
Chris PeBenito |
bbd6a6 |
role system_r types useradd_t;
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
########################################
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
# Chfn local policy
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
allow chfn_t self:capability { chown dac_override fsetid setuid setgid sys_resource };
|
|
Chris PeBenito |
9d3bdc |
allow chfn_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execheap execstack };
|
|
Chris PeBenito |
849380 |
allow chfn_t self:process { setrlimit setfscreate };
|
|
Chris PeBenito |
849380 |
allow chfn_t self:fd use;
|
|
Chris PeBenito |
dc67f7 |
allow chfn_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
725926 |
allow chfn_t self:sock_file r_file_perms;
|
|
Chris PeBenito |
dc67f7 |
allow chfn_t self:shm create_shm_perms;
|
|
Chris PeBenito |
dc67f7 |
allow chfn_t self:sem create_sem_perms;
|
|
Chris PeBenito |
dc67f7 |
allow chfn_t self:msgq create_msgq_perms;
|
|
Chris PeBenito |
849380 |
allow chfn_t self:msg { send receive };
|
|
Chris PeBenito |
77f6e2 |
allow chfn_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
77f6e2 |
allow chfn_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
77f6e2 |
allow chfn_t self:unix_dgram_socket sendto;
|
|
Chris PeBenito |
77f6e2 |
allow chfn_t self:unix_stream_socket connectto;
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
kernel_read_system_state(chfn_t)
|
|
Chris PeBenito |
445522 |
kernel_read_kernel_sysctls(chfn_t)
|
|
Chris PeBenito |
a08248 |
|
|
Chris PeBenito |
5e0da6 |
selinux_get_fs_mount(chfn_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_validate_context(chfn_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_access_vector(chfn_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_create_context(chfn_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_relabel_context(chfn_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_user_contexts(chfn_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ttys(chfn_t)
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ptys(chfn_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
0fd9dc |
fs_getattr_xattr_fs(chfn_t)
|
|
Chris PeBenito |
ab940a |
fs_search_auto_mountpoints(chfn_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
# for SSP
|
|
Karl MacMillan |
f0c985 |
dev_read_urand(chfn_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
3774e4 |
auth_domtrans_chk_passwd(chfn_t)
|
|
Chris PeBenito |
3774e4 |
auth_dontaudit_read_shadow(chfn_t)
|
|
Chris PeBenito |
3774e4 |
|
|
Chris PeBenito |
ebdc3b |
# can exec /sbin/unix_chkpwd
|
|
Chris PeBenito |
ebdc3b |
corecmd_search_bin(chfn_t)
|
|
Chris PeBenito |
ebdc3b |
corecmd_search_sbin(chfn_t)
|
|
Chris PeBenito |
725926 |
# allow checking if a shell is executable
|
|
Chris PeBenito |
725926 |
corecmd_check_exec_shell(chfn_t)
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
15722e |
domain_use_interactive_fds(chfn_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
8fd367 |
files_manage_etc_files(chfn_t)
|
|
Chris PeBenito |
c9428d |
files_read_etc_runtime_files(chfn_t)
|
|
Chris PeBenito |
ab940a |
files_dontaudit_search_var(chfn_t)
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
ab940a |
# /usr/bin/passwd asks for w access to utmp, but it will operate
|
|
Chris PeBenito |
ab940a |
# correctly without it. Do not audit write denials to utmp.
|
|
Chris PeBenito |
68228b |
init_dontaudit_rw_utmp(chfn_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so(chfn_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs(chfn_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
miscfiles_read_localization(chfn_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
c9428d |
logging_send_syslog_msg(chfn_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
3774e4 |
# uses unix_chkpwd for checking passwords
|
|
Chris PeBenito |
3774e4 |
seutil_dontaudit_search_config(chfn_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
103fe2 |
userdom_use_unpriv_users_fds(chfn_t)
|
|
Chris PeBenito |
3774e4 |
# user generally runs this from their home directory, so do not audit a search
|
|
Chris PeBenito |
3774e4 |
# on user home dir
|
|
Chris PeBenito |
103fe2 |
userdom_dontaudit_search_all_users_home_content(chfn_t)
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
ab940a |
nis_use_ypbind(chfn_t)
|
|
Chris PeBenito |
ab940a |
')
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
1815ba |
nscd_socket_use(chfn_t)
|
|
Chris PeBenito |
bf080a |
')
|
|
Chris PeBenito |
bf080a |
|
|
Chris PeBenito |
849380 |
########################################
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
# Crack local policy
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
allow crack_t self:process { sigkill sigstop signull signal };
|
|
Chris PeBenito |
dc67f7 |
allow crack_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
dc67f7 |
allow crack_t crack_db_t:dir rw_dir_perms;
|
|
Chris PeBenito |
dc67f7 |
allow crack_t crack_db_t:file create_file_perms;
|
|
Chris PeBenito |
dc67f7 |
allow crack_t crack_db_t:lnk_file create_file_perms;
|
|
Chris PeBenito |
c9428d |
files_search_var(crack_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
dc67f7 |
allow crack_t crack_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
dc67f7 |
allow crack_t crack_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
103fe2 |
files_tmp_filetrans(crack_t, crack_tmp_t, { file dir })
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
kernel_read_system_state(crack_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
# for SSP
|
|
Karl MacMillan |
f0c985 |
dev_read_urand(crack_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
0fd9dc |
fs_getattr_xattr_fs(crack_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
8fd367 |
files_read_etc_files(crack_t)
|
|
Chris PeBenito |
c9428d |
files_read_etc_runtime_files(crack_t)
|
|
Chris PeBenito |
849380 |
# for dictionaries
|
|
Chris PeBenito |
c9428d |
files_read_usr_files(crack_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
c9428d |
corecmd_exec_bin(crack_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so(crack_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs(crack_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
c9428d |
logging_send_syslog_msg(crack_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
103fe2 |
userdom_dontaudit_search_sysadm_home_dirs(crack_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
3774e4 |
cron_system_entry(crack_t,crack_exec_t)
|
|
Chris PeBenito |
3774e4 |
')
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
########################################
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
# Groupadd local policy
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
allow groupadd_t self:capability { dac_override chown kill setuid sys_resource };
|
|
Chris PeBenito |
849380 |
dontaudit groupadd_t self:capability fsetid;
|
|
Chris PeBenito |
9d3bdc |
allow groupadd_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execheap execstack };
|
|
Chris PeBenito |
849380 |
allow groupadd_t self:process { setrlimit setfscreate };
|
|
Chris PeBenito |
849380 |
allow groupadd_t self:fd use;
|
|
Chris PeBenito |
dc67f7 |
allow groupadd_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
dc67f7 |
allow groupadd_t self:shm create_shm_perms;
|
|
Chris PeBenito |
dc67f7 |
allow groupadd_t self:sem create_sem_perms;
|
|
Chris PeBenito |
dc67f7 |
allow groupadd_t self:msgq create_msgq_perms;
|
|
Chris PeBenito |
849380 |
allow groupadd_t self:msg { send receive };
|
|
Chris PeBenito |
77f6e2 |
allow groupadd_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
77f6e2 |
allow groupadd_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
77f6e2 |
allow groupadd_t self:unix_dgram_socket sendto;
|
|
Chris PeBenito |
77f6e2 |
allow groupadd_t self:unix_stream_socket connectto;
|
|
Chris PeBenito |
bf080a |
allow groupadd_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
ab940a |
fs_getattr_xattr_fs(groupadd_t)
|
|
Chris PeBenito |
ab940a |
fs_search_auto_mountpoints(groupadd_t)
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
849380 |
# Allow access to context for shadow file
|
|
Chris PeBenito |
5e0da6 |
selinux_get_fs_mount(groupadd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_validate_context(groupadd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_access_vector(groupadd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_create_context(groupadd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_relabel_context(groupadd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_user_contexts(groupadd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ttys(groupadd_t)
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ptys(groupadd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
1c1ac6 |
init_use_fds(groupadd_t)
|
|
Chris PeBenito |
68228b |
init_read_utmp(groupadd_t)
|
|
Chris PeBenito |
68228b |
init_dontaudit_write_utmp(groupadd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
15722e |
domain_use_interactive_fds(groupadd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
8fd367 |
files_manage_etc_files(groupadd_t)
|
|
Chris PeBenito |
2629c6 |
files_relabel_etc_files(groupadd_t)
|
|
Chris PeBenito |
724925 |
files_read_etc_runtime_files(groupadd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so(groupadd_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs(groupadd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
# Execute /usr/bin/{passwd,chfn,chsh} and /usr/sbin/{useradd,vipw}.
|
|
Chris PeBenito |
c9428d |
corecmd_exec_bin(groupadd_t)
|
|
Chris PeBenito |
c9428d |
corecmd_exec_sbin(groupadd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
c9428d |
logging_send_syslog_msg(groupadd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
miscfiles_read_localization(groupadd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
c9428d |
auth_manage_shadow(groupadd_t)
|
|
Chris PeBenito |
2629c6 |
auth_relabel_shadow(groupadd_t)
|
|
Chris PeBenito |
8bf6f5 |
auth_etc_filetrans_shadow(groupadd_t)
|
|
Chris PeBenito |
c9428d |
auth_rw_lastlog(groupadd_t)
|
|
Chris PeBenito |
77f6e2 |
auth_use_nsswitch(groupadd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
5e0da6 |
seutil_read_config(groupadd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
103fe2 |
userdom_use_unpriv_users_fds(groupadd_t)
|
|
Chris PeBenito |
3774e4 |
# for when /root is the cwd
|
|
Chris PeBenito |
103fe2 |
userdom_dontaudit_search_sysadm_home_dirs(groupadd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
0c54fc |
dpkg_use_fds(groupadd_t)
|
|
Chris PeBenito |
0c54fc |
dpkg_rw_pipes(groupadd_t)
|
|
Chris PeBenito |
0c54fc |
')
|
|
Chris PeBenito |
0c54fc |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
ab940a |
nis_use_ypbind(groupadd_t)
|
|
Chris PeBenito |
849380 |
')
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
1815ba |
nscd_socket_use(groupadd_t)
|
|
Chris PeBenito |
493d6c |
')
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
1c1ac6 |
rpm_use_fds(groupadd_t)
|
|
Chris PeBenito |
1815ba |
rpm_rw_pipes(groupadd_t)
|
|
Chris PeBenito |
b24f35 |
')
|
|
Chris PeBenito |
b24f35 |
|
|
Chris PeBenito |
849380 |
########################################
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
# Passwd local policy
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
bf080a |
allow passwd_t self:capability { chown dac_override fsetid setuid setgid sys_resource audit_control audit_write };
|
|
Chris PeBenito |
9d3bdc |
allow passwd_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
|
|
Chris PeBenito |
849380 |
allow passwd_t self:process { setrlimit setfscreate };
|
|
Chris PeBenito |
849380 |
allow passwd_t self:fd use;
|
|
Chris PeBenito |
dc67f7 |
allow passwd_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
30910b |
allow passwd_t self:sock_file r_file_perms;
|
|
Chris PeBenito |
dc67f7 |
allow passwd_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
dc67f7 |
allow passwd_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
849380 |
allow passwd_t self:unix_dgram_socket sendto;
|
|
Chris PeBenito |
849380 |
allow passwd_t self:unix_stream_socket connectto;
|
|
Chris PeBenito |
0907bd |
allow passwd_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
|
|
Chris PeBenito |
dc67f7 |
allow passwd_t self:shm create_shm_perms;
|
|
Chris PeBenito |
dc67f7 |
allow passwd_t self:sem create_sem_perms;
|
|
Chris PeBenito |
0fd9dc |
allow passwd_t self:msgq create_msgq_perms;
|
|
Chris PeBenito |
849380 |
allow passwd_t self:msg { send receive };
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
ab940a |
allow passwd_t crack_db_t:dir r_dir_perms;
|
|
Chris PeBenito |
ab940a |
allow passwd_t crack_db_t:file r_file_perms;
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
445522 |
kernel_read_kernel_sysctls(passwd_t)
|
|
Chris PeBenito |
a08248 |
|
|
Chris PeBenito |
ab940a |
# for SSP
|
|
Chris PeBenito |
ab940a |
dev_read_urand(passwd_t)
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
ab940a |
fs_getattr_xattr_fs(passwd_t)
|
|
Chris PeBenito |
ab940a |
fs_search_auto_mountpoints(passwd_t)
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
955019 |
mls_file_write_down(passwd_t)
|
|
Chris PeBenito |
955019 |
mls_file_downgrade(passwd_t)
|
|
Chris PeBenito |
955019 |
|
|
Chris PeBenito |
5e0da6 |
selinux_get_fs_mount(passwd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_validate_context(passwd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_access_vector(passwd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_create_context(passwd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_relabel_context(passwd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_user_contexts(passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
4614e8 |
term_use_all_user_ttys(passwd_t)
|
|
Chris PeBenito |
4614e8 |
term_use_all_user_ptys(passwd_t)
|
|
Chris PeBenito |
4614e8 |
|
|
Chris PeBenito |
3774e4 |
auth_manage_shadow(passwd_t)
|
|
Chris PeBenito |
2629c6 |
auth_relabel_shadow(passwd_t)
|
|
Chris PeBenito |
8bf6f5 |
auth_etc_filetrans_shadow(passwd_t)
|
|
Chris PeBenito |
3774e4 |
|
|
Chris PeBenito |
725926 |
# allow checking if a shell is executable
|
|
Chris PeBenito |
725926 |
corecmd_check_exec_shell(passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
15722e |
domain_use_interactive_fds(passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
c9428d |
files_read_etc_runtime_files(passwd_t)
|
|
Chris PeBenito |
8fd367 |
files_manage_etc_files(passwd_t)
|
|
Chris PeBenito |
ab940a |
files_search_var(passwd_t)
|
|
Chris PeBenito |
3774e4 |
files_dontaudit_search_pids(passwd_t)
|
|
Chris PeBenito |
2629c6 |
files_relabel_etc_files(passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
725926 |
# /usr/bin/passwd asks for w access to utmp, but it will operate
|
|
Chris PeBenito |
725926 |
# correctly without it. Do not audit write denials to utmp.
|
|
Chris PeBenito |
68228b |
init_dontaudit_rw_utmp(passwd_t)
|
|
Chris PeBenito |
725926 |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so(passwd_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs(passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
c9428d |
logging_send_syslog_msg(passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
miscfiles_read_localization(passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
3774e4 |
seutil_dontaudit_search_config(passwd_t)
|
|
Chris PeBenito |
a1f94a |
|
|
Chris PeBenito |
103fe2 |
userdom_use_unpriv_users_fds(passwd_t)
|
|
Chris PeBenito |
2629c6 |
# make sure that getcon succeeds
|
|
Chris PeBenito |
15722e |
userdom_getattr_all_users(passwd_t)
|
|
Chris PeBenito |
1815ba |
userdom_read_all_users_state(passwd_t)
|
|
Chris PeBenito |
3774e4 |
# user generally runs this from their home directory, so do not audit a search
|
|
Chris PeBenito |
3774e4 |
# on user home dir
|
|
Chris PeBenito |
103fe2 |
userdom_dontaudit_search_all_users_home_content(passwd_t)
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
ab940a |
nis_use_ypbind(passwd_t)
|
|
Chris PeBenito |
ab940a |
')
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
1815ba |
nscd_socket_use(passwd_t)
|
|
Chris PeBenito |
bf080a |
')
|
|
Chris PeBenito |
bf080a |
|
|
Chris PeBenito |
849380 |
########################################
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
# Password admin local policy
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
allow sysadm_passwd_t self:capability { chown dac_override fsetid setuid setgid sys_resource };
|
|
Chris PeBenito |
9d3bdc |
allow sysadm_passwd_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
|
|
Chris PeBenito |
849380 |
allow sysadm_passwd_t self:process { setrlimit setfscreate };
|
|
Chris PeBenito |
849380 |
allow sysadm_passwd_t self:fd use;
|
|
Chris PeBenito |
dc67f7 |
allow sysadm_passwd_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
725926 |
allow sysadm_passwd_t self:sock_file r_file_perms;
|
|
Chris PeBenito |
dc67f7 |
allow sysadm_passwd_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
dc67f7 |
allow sysadm_passwd_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
849380 |
allow sysadm_passwd_t self:unix_dgram_socket sendto;
|
|
Chris PeBenito |
849380 |
allow sysadm_passwd_t self:unix_stream_socket connectto;
|
|
Chris PeBenito |
dc67f7 |
allow sysadm_passwd_t self:shm create_shm_perms;
|
|
Chris PeBenito |
dc67f7 |
allow sysadm_passwd_t self:sem create_sem_perms;
|
|
Chris PeBenito |
dc67f7 |
allow sysadm_passwd_t self:msgq create_msgq_perms;
|
|
Chris PeBenito |
849380 |
allow sysadm_passwd_t self:msg { send receive };
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
# allow vipw to create temporary files under /var/tmp/vi.recover
|
|
Chris PeBenito |
dc67f7 |
allow sysadm_passwd_t sysadm_passwd_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
0fd9dc |
allow sysadm_passwd_t sysadm_passwd_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
103fe2 |
files_tmp_filetrans(sysadm_passwd_t, sysadm_passwd_tmp_t, { file dir })
|
|
Chris PeBenito |
c9428d |
files_search_var(sysadm_passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
445522 |
kernel_read_kernel_sysctls(sysadm_passwd_t)
|
|
Chris PeBenito |
a08248 |
# for /proc/meminfo
|
|
Chris PeBenito |
a08248 |
kernel_read_system_state(sysadm_passwd_t)
|
|
Chris PeBenito |
a08248 |
|
|
Chris PeBenito |
5e0da6 |
selinux_get_fs_mount(sysadm_passwd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_validate_context(sysadm_passwd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_access_vector(sysadm_passwd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_create_context(sysadm_passwd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_relabel_context(sysadm_passwd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_user_contexts(sysadm_passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
# for SSP
|
|
Karl MacMillan |
f0c985 |
dev_read_urand(sysadm_passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
0fd9dc |
fs_getattr_xattr_fs(sysadm_passwd_t)
|
|
Chris PeBenito |
ab940a |
fs_search_auto_mountpoints(sysadm_passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ttys(sysadm_passwd_t)
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ptys(sysadm_passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
ab940a |
auth_manage_shadow(sysadm_passwd_t)
|
|
Chris PeBenito |
2629c6 |
auth_relabel_shadow(sysadm_passwd_t)
|
|
Chris PeBenito |
8bf6f5 |
auth_etc_filetrans_shadow(sysadm_passwd_t)
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
2629c6 |
# allow checking if a shell is executable
|
|
Chris PeBenito |
2629c6 |
corecmd_check_exec_shell(sysadm_passwd_t)
|
|
Chris PeBenito |
ab940a |
# allow vipw to exec the editor
|
|
Chris PeBenito |
725926 |
corecmd_search_sbin(sysadm_passwd_t)
|
|
Chris PeBenito |
ab940a |
corecmd_exec_bin(sysadm_passwd_t)
|
|
Chris PeBenito |
ab940a |
corecmd_exec_shell(sysadm_passwd_t)
|
|
Chris PeBenito |
ab940a |
files_read_usr_files(sysadm_passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
15722e |
domain_use_interactive_fds(sysadm_passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
8fd367 |
files_manage_etc_files(sysadm_passwd_t)
|
|
Chris PeBenito |
2629c6 |
files_relabel_etc_files(sysadm_passwd_t)
|
|
Chris PeBenito |
c9428d |
files_read_etc_runtime_files(sysadm_passwd_t)
|
|
Chris PeBenito |
3774e4 |
# for nscd lookups
|
|
Chris PeBenito |
3774e4 |
files_dontaudit_search_pids(sysadm_passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
ab940a |
# /usr/bin/passwd asks for w access to utmp, but it will operate
|
|
Chris PeBenito |
ab940a |
# correctly without it. Do not audit write denials to utmp.
|
|
Chris PeBenito |
68228b |
init_dontaudit_rw_utmp(sysadm_passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so(sysadm_passwd_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs(sysadm_passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
miscfiles_read_localization(sysadm_passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
c9428d |
logging_send_syslog_msg(sysadm_passwd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
3774e4 |
seutil_dontaudit_search_config(sysadm_passwd_t)
|
|
Chris PeBenito |
3774e4 |
|
|
Chris PeBenito |
103fe2 |
userdom_use_unpriv_users_fds(sysadm_passwd_t)
|
|
Chris PeBenito |
3774e4 |
# user generally runs this from their home directory, so do not audit a search
|
|
Chris PeBenito |
3774e4 |
# on user home dir
|
|
Chris PeBenito |
103fe2 |
userdom_dontaudit_search_all_users_home_content(sysadm_passwd_t)
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
ab940a |
nis_use_ypbind(sysadm_passwd_t)
|
|
Chris PeBenito |
ab940a |
')
|
|
Chris PeBenito |
a1f94a |
|
|
Chris PeBenito |
849380 |
########################################
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
# Useradd local policy
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
allow useradd_t self:capability { dac_override chown kill fowner fsetid setuid sys_resource };
|
|
Chris PeBenito |
9d3bdc |
allow useradd_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
|
|
Chris PeBenito |
849380 |
allow useradd_t self:process setfscreate;
|
|
Chris PeBenito |
849380 |
allow useradd_t self:fd use;
|
|
Chris PeBenito |
dc67f7 |
allow useradd_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
dc67f7 |
allow useradd_t self:shm create_shm_perms;
|
|
Chris PeBenito |
dc67f7 |
allow useradd_t self:sem create_sem_perms;
|
|
Chris PeBenito |
dc67f7 |
allow useradd_t self:msgq create_msgq_perms;
|
|
Chris PeBenito |
849380 |
allow useradd_t self:msg { send receive };
|
|
Chris PeBenito |
77f6e2 |
allow useradd_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
77f6e2 |
allow useradd_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
77f6e2 |
allow useradd_t self:unix_dgram_socket sendto;
|
|
Chris PeBenito |
77f6e2 |
allow useradd_t self:unix_stream_socket connectto;
|
|
Chris PeBenito |
bf080a |
allow useradd_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
# Allow access to context for shadow file
|
|
Chris PeBenito |
5e0da6 |
selinux_get_fs_mount(useradd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_validate_context(useradd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_access_vector(useradd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_create_context(useradd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_relabel_context(useradd_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_user_contexts(useradd_t)
|
|
Chris PeBenito |
849380 |
# for getting the number of groups
|
|
Chris PeBenito |
445522 |
kernel_read_kernel_sysctls(useradd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
ab940a |
fs_search_auto_mountpoints(useradd_t)
|
|
Chris PeBenito |
0fd9dc |
fs_getattr_xattr_fs(useradd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ttys(useradd_t)
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ptys(useradd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
ab940a |
auth_manage_shadow(useradd_t)
|
|
Chris PeBenito |
2629c6 |
auth_relabel_shadow(useradd_t)
|
|
Chris PeBenito |
8bf6f5 |
auth_etc_filetrans_shadow(useradd_t)
|
|
Chris PeBenito |
ab940a |
auth_rw_lastlog(useradd_t)
|
|
Chris PeBenito |
77f6e2 |
auth_use_nsswitch(useradd_t)
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
ab940a |
corecmd_exec_shell(useradd_t)
|
|
Chris PeBenito |
ab940a |
# Execute /usr/bin/{passwd,chfn,chsh} and /usr/sbin/{useradd,vipw}.
|
|
Chris PeBenito |
ab940a |
corecmd_exec_bin(useradd_t)
|
|
Chris PeBenito |
ab940a |
corecmd_exec_sbin(useradd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
15722e |
domain_use_interactive_fds(useradd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
8fd367 |
files_manage_etc_files(useradd_t)
|
|
Chris PeBenito |
a08248 |
files_search_var_lib(useradd_t)
|
|
Chris PeBenito |
2629c6 |
files_relabel_etc_files(useradd_t)
|
|
Chris PeBenito |
724925 |
files_read_etc_runtime_files(useradd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
1c1ac6 |
init_use_fds(useradd_t)
|
|
Chris PeBenito |
68228b |
init_rw_utmp(useradd_t)
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so(useradd_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs(useradd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
ab940a |
logging_send_syslog_msg(useradd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
miscfiles_read_localization(useradd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
5e0da6 |
seutil_read_config(useradd_t)
|
|
Chris PeBenito |
605ba2 |
seutil_read_file_contexts(useradd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
103fe2 |
userdom_use_unpriv_users_fds(useradd_t)
|
|
Chris PeBenito |
3774e4 |
# for when /root is the cwd
|
|
Chris PeBenito |
103fe2 |
userdom_dontaudit_search_sysadm_home_dirs(useradd_t)
|
|
Chris PeBenito |
3774e4 |
# Add/remove user home directories
|
|
Chris PeBenito |
103fe2 |
userdom_home_filetrans_generic_user_home_dir(useradd_t)
|
|
Chris PeBenito |
103fe2 |
userdom_manage_generic_user_home_content_dirs(useradd_t)
|
|
Chris PeBenito |
0e1c46 |
userdom_manage_generic_user_home_content_files(useradd_t)
|
|
Chris PeBenito |
cdc86e |
userdom_manage_staff_home_dirs(useradd_t)
|
|
Chris PeBenito |
103fe2 |
userdom_generic_user_home_dir_filetrans_generic_user_home_content(useradd_t,notdevfile_class_set)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
ab940a |
mta_manage_spool(useradd_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
0c54fc |
dpkg_use_fds(useradd_t)
|
|
Chris PeBenito |
0c54fc |
dpkg_rw_pipes(useradd_t)
|
|
Chris PeBenito |
0c54fc |
')
|
|
Chris PeBenito |
0c54fc |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
ab940a |
nis_use_ypbind(useradd_t)
|
|
Chris PeBenito |
849380 |
')
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
1815ba |
nscd_socket_use(useradd_t)
|
|
Chris PeBenito |
493d6c |
')
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
1c1ac6 |
rpm_use_fds(useradd_t)
|
|
Chris PeBenito |
1815ba |
rpm_rw_pipes(useradd_t)
|
|
Chris PeBenito |
b24f35 |
')
|