|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
f7925f |
policy_module(usermanage,1.9.0)
|
|
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 |
d46cfe |
type chfn_exec_t;
|
|
Chris PeBenito |
1815ba |
domain_obj_id_change_exemption(chfn_t)
|
|
Chris PeBenito |
d46cfe |
application_domain(chfn_t,chfn_exec_t)
|
|
Chris PeBenito |
849380 |
role system_r types chfn_t;
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
849380 |
type crack_t;
|
|
Chris PeBenito |
849380 |
type crack_exec_t;
|
|
Chris PeBenito |
d46cfe |
application_domain(crack_t,crack_exec_t)
|
|
Chris PeBenito |
d46cfe |
role system_r types crack_t;
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
9bbc75 |
type crack_db_t;
|
|
Chris PeBenito |
b68a85 |
files_type(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 |
d46cfe |
type passwd_exec_t;
|
|
Chris PeBenito |
1815ba |
domain_obj_id_change_exemption(passwd_t)
|
|
Chris PeBenito |
d46cfe |
application_domain(passwd_t,passwd_exec_t)
|
|
Chris PeBenito |
849380 |
role system_r types passwd_t;
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
a1f94a |
type sysadm_passwd_t;
|
|
Chris PeBenito |
1815ba |
domain_obj_id_change_exemption(sysadm_passwd_t)
|
|
Chris PeBenito |
d46cfe |
application_domain(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 |
c0868a |
allow chfn_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
c0868a |
allow chfn_t self:sock_file read_sock_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 |
c0cf6e |
auth_use_nsswitch(chfn_t)
|
|
Chris PeBenito |
3774e4 |
|
|
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 |
6b19be |
files_dontaudit_search_home(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 |
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 |
c0868a |
allow crack_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(crack_t,crack_db_t,crack_db_t)
|
|
Chris PeBenito |
c0868a |
manage_lnk_files_pattern(crack_t,crack_db_t,crack_db_t)
|
|
Chris PeBenito |
c9428d |
files_search_var(crack_t)
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
c0868a |
manage_dirs_pattern(crack_t,crack_tmp_t,crack_tmp_t)
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(crack_t,crack_tmp_t,crack_tmp_t)
|
|
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 |
da9bbc |
allow groupadd_t self:capability { dac_override chown kill setuid sys_resource audit_write };
|
|
Chris PeBenito |
d6d16b |
dontaudit groupadd_t self:capability { fsetid sys_tty_config };
|
|
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 |
c0868a |
allow groupadd_t self:fifo_file rw_fifo_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 |
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 |
849380 |
|
|
Chris PeBenito |
0a0b80 |
logging_send_audit_msgs(groupadd_t)
|
|
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 |
0a0b80 |
nscd_domtrans(groupadd_t)
|
|
Chris PeBenito |
0a0b80 |
')
|
|
Chris PeBenito |
0a0b80 |
|
|
Chris PeBenito |
0a0b80 |
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 |
0a0b80 |
allow passwd_t self:capability { chown dac_override fsetid setuid setgid sys_resource };
|
|
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 |
c0868a |
allow passwd_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
c0868a |
allow passwd_t self:sock_file read_sock_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 |
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 |
c0868a |
allow passwd_t crack_db_t:dir list_dir_perms;
|
|
Chris PeBenito |
c0868a |
read_files_pattern(passwd_t,crack_db_t,crack_db_t)
|
|
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 |
f8233a |
mls_file_write_all_levels(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 |
c0cf6e |
auth_use_nsswitch(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 |
0a0b80 |
logging_send_audit_msgs(passwd_t)
|
|
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 |
0a0b80 |
nscd_domtrans(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 |
c0868a |
allow sysadm_passwd_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
c0868a |
allow sysadm_passwd_t self:sock_file read_sock_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 |
c0868a |
manage_dirs_pattern(sysadm_passwd_t,sysadm_passwd_tmp_t,sysadm_passwd_tmp_t)
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(sysadm_passwd_t,sysadm_passwd_tmp_t,sysadm_passwd_tmp_t)
|
|
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 |
d9845a |
files_dontaudit_search_home(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 |
c0cf6e |
auth_use_nsswitch(sysadm_passwd_t)
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
ab940a |
# allow vipw to exec the editor
|
|
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 |
0a0b80 |
nscd_domtrans(sysadm_passwd_t)
|
|
Chris PeBenito |
8708d9 |
')
|
|
Chris PeBenito |
8708d9 |
|
|
Chris PeBenito |
849380 |
########################################
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
# Useradd local policy
|
|
Chris PeBenito |
849380 |
#
|
|
Chris PeBenito |
849380 |
|
|
Chris PeBenito |
0a0b80 |
allow useradd_t self:capability { dac_override chown kill fowner fsetid setuid sys_resource };
|
|
Chris PeBenito |
d6d16b |
dontaudit useradd_t self:capability sys_tty_config;
|
|
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 |
c0868a |
allow useradd_t self:fifo_file rw_fifo_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 |
849380 |
|
|
Chris PeBenito |
d9845a |
# for getting the number of groups
|
|
Chris PeBenito |
d9845a |
kernel_read_kernel_sysctls(useradd_t)
|
|
Chris PeBenito |
d9845a |
|
|
Chris PeBenito |
d9845a |
corecmd_exec_shell(useradd_t)
|
|
Chris PeBenito |
d9845a |
# Execute /usr/bin/{passwd,chfn,chsh} and /usr/sbin/{useradd,vipw}.
|
|
Chris PeBenito |
d9845a |
corecmd_exec_bin(useradd_t)
|
|
Chris PeBenito |
d9845a |
|
|
Chris PeBenito |
d9845a |
domain_use_interactive_fds(useradd_t)
|
|
Chris PeBenito |
d9845a |
|
|
Chris PeBenito |
d9845a |
files_manage_etc_files(useradd_t)
|
|
Chris PeBenito |
d9845a |
files_search_var_lib(useradd_t)
|
|
Chris PeBenito |
d9845a |
files_relabel_etc_files(useradd_t)
|
|
Chris PeBenito |
d9845a |
files_read_etc_runtime_files(useradd_t)
|
|
Chris PeBenito |
d9845a |
|
|
Chris PeBenito |
d9845a |
fs_search_auto_mountpoints(useradd_t)
|
|
Chris PeBenito |
d9845a |
fs_getattr_xattr_fs(useradd_t)
|
|
Chris PeBenito |
d9845a |
|
|
Chris PeBenito |
6b19be |
mls_file_upgrade(useradd_t)
|
|
Chris PeBenito |
6b19be |
|
|
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 |
|
|
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 |
a5e213 |
auth_rw_faillog(useradd_t)
|
|
Chris PeBenito |
77f6e2 |
auth_use_nsswitch(useradd_t)
|
|
Chris PeBenito |
ab940a |
|
|
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 |
0a0b80 |
logging_send_audit_msgs(useradd_t)
|
|
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 |
d9845a |
seutil_read_default_contexts(useradd_t)
|
|
Chris PeBenito |
6b19be |
seutil_domtrans_semanage(useradd_t)
|
|
Chris PeBenito |
762d2c |
seutil_domtrans_setfiles(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 |
6b19be |
userdom_manage_all_users_home_content_dirs(useradd_t)
|
|
Chris PeBenito |
6b19be |
userdom_manage_all_users_home_content_files(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 |
2f2716 |
apache_manage_all_user_content(useradd_t)
|
|
Chris PeBenito |
2f2716 |
')
|
|
Chris PeBenito |
2f2716 |
|
|
Chris PeBenito |
2f2716 |
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 |
0a0b80 |
nscd_domtrans(useradd_t)
|
|
Chris PeBenito |
0a0b80 |
')
|
|
Chris PeBenito |
0a0b80 |
|
|
Chris PeBenito |
0a0b80 |
optional_policy(`
|
|
Chris PeBenito |
1c1ac6 |
rpm_use_fds(useradd_t)
|
|
Chris PeBenito |
1815ba |
rpm_rw_pipes(useradd_t)
|
|
Chris PeBenito |
b24f35 |
')
|