]> git.ipfire.org Git - people/stevee/selinux-policy.git/blobdiff - policy/modules/admin/usermanage.te
Revert "Add files_add_entry_var_lib_dirs() interface"
[people/stevee/selinux-policy.git] / policy / modules / admin / usermanage.te
index b123de0b83e2e727cac9954f9891b2b622b70c0b..6bcfc8cebe3d86df107ae31658640afc458706b7 100644 (file)
@@ -71,6 +71,7 @@ allow chfn_t self:unix_stream_socket connectto;
 
 kernel_read_system_state(chfn_t)
 kernel_read_kernel_sysctls(chfn_t)
+kernel_dontaudit_getattr_core_if(chfn_t)
 
 selinux_get_fs_mount(chfn_t)
 selinux_validate_context(chfn_t)
@@ -81,13 +82,16 @@ selinux_compute_user_contexts(chfn_t)
 
 term_use_all_inherited_ttys(chfn_t)
 term_use_all_inherited_ptys(chfn_t)
+term_getattr_all_ptys(chfn_t)
 
 fs_getattr_xattr_fs(chfn_t)
 fs_search_auto_mountpoints(chfn_t)
 
 # for SSP
 dev_read_urand(chfn_t)
+dev_dontaudit_getattr_all(chfn_t)
 
+auth_manage_passwd(chfn_t)
 auth_use_pam(chfn_t)
 
 # allow checking if a shell is executable
@@ -95,7 +99,6 @@ corecmd_check_exec_shell(chfn_t)
 
 domain_use_interactive_fds(chfn_t)
 
-files_manage_etc_files(chfn_t)
 files_read_etc_runtime_files(chfn_t)
 files_dontaudit_search_var(chfn_t)
 files_dontaudit_search_home(chfn_t)
@@ -103,6 +106,7 @@ files_dontaudit_search_home(chfn_t)
 # /usr/bin/passwd asks for w access to utmp, but it will operate
 # correctly without it.  Do not audit write denials to utmp.
 init_dontaudit_rw_utmp(chfn_t)
+init_dontaudit_getattr_initctl(chfn_t)
 
 miscfiles_read_localization(chfn_t)
 
@@ -197,6 +201,7 @@ selinux_compute_relabel_context(groupadd_t)
 selinux_compute_user_contexts(groupadd_t)
 
 term_use_all_inherited_terms(groupadd_t)
+term_getattr_all_ptys(groupadd_t)
 
 init_use_fds(groupadd_t)
 init_read_utmp(groupadd_t)
@@ -204,8 +209,8 @@ init_dontaudit_write_utmp(groupadd_t)
 
 domain_use_interactive_fds(groupadd_t)
 
-files_manage_etc_files(groupadd_t)
 files_relabel_etc_files(groupadd_t)
+files_read_etc_files(groupadd_t)
 files_read_etc_runtime_files(groupadd_t)
 files_read_usr_symlinks(groupadd_t)
 
@@ -220,9 +225,10 @@ miscfiles_read_localization(groupadd_t)
 auth_domtrans_chk_passwd(groupadd_t)
 auth_rw_lastlog(groupadd_t)
 auth_use_nsswitch(groupadd_t)
+auth_manage_passwd(groupadd_t)
+auth_manage_shadow(groupadd_t)
 # these may be unnecessary due to the above
 # domtrans_chk_passwd() call.
-auth_manage_shadow(groupadd_t)
 auth_relabel_shadow(groupadd_t)
 auth_etc_filetrans_shadow(groupadd_t)
 
@@ -278,6 +284,7 @@ kernel_read_kernel_sysctls(passwd_t)
 
 # for SSP
 dev_read_urand(passwd_t)
+dev_dontaudit_getattr_all(passwd_t)
 
 fs_getattr_xattr_fs(passwd_t)
 fs_search_auto_mountpoints(passwd_t)
@@ -293,7 +300,9 @@ selinux_compute_relabel_context(passwd_t)
 selinux_compute_user_contexts(passwd_t)
 
 term_use_all_inherited_terms(passwd_t)
+term_getattr_all_ptys(passwd_t)
 
+auth_manage_passwd(passwd_t)
 auth_manage_shadow(passwd_t)
 auth_relabel_shadow(passwd_t)
 auth_etc_filetrans_shadow(passwd_t)
@@ -308,11 +317,12 @@ corenet_tcp_connect_kerberos_password_port(passwd_t)
 domain_use_interactive_fds(passwd_t)
 
 files_read_etc_runtime_files(passwd_t)
-files_manage_etc_files(passwd_t)
 files_search_var(passwd_t)
 files_dontaudit_search_pids(passwd_t)
 files_relabel_etc_files(passwd_t)
 
+term_search_ptys(passwd_t)
+
 # /usr/bin/passwd asks for w access to utmp, but it will operate
 # correctly without it.  Do not audit write denials to utmp.
 init_dontaudit_rw_utmp(passwd_t)
@@ -385,7 +395,9 @@ fs_getattr_xattr_fs(sysadm_passwd_t)
 fs_search_auto_mountpoints(sysadm_passwd_t)
 
 term_use_all_inherited_terms(sysadm_passwd_t)
+term_getattr_all_ptys(sysadm_passwd_t)
 
+auth_manage_passwd(sysadm_passwd_t)
 auth_manage_shadow(sysadm_passwd_t)
 auth_relabel_shadow(sysadm_passwd_t)
 auth_etc_filetrans_shadow(sysadm_passwd_t)
@@ -398,7 +410,6 @@ files_read_usr_files(sysadm_passwd_t)
 
 domain_use_interactive_fds(sysadm_passwd_t)
 
-files_manage_etc_files(sysadm_passwd_t)
 files_relabel_etc_files(sysadm_passwd_t)
 files_read_etc_runtime_files(sysadm_passwd_t)
 # for nscd lookups
@@ -428,7 +439,8 @@ optional_policy(`
 # Useradd local policy
 #
 
-allow useradd_t self:capability { dac_override chown kill fowner fsetid setuid sys_resource sys_ptrace };
+allow useradd_t self:capability { dac_override chown kill fowner fsetid setuid sys_resource };
+
 dontaudit useradd_t self:capability sys_tty_config;
 allow useradd_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
 allow useradd_t self:process setfscreate;
@@ -450,10 +462,13 @@ corecmd_exec_shell(useradd_t)
 # Execute /usr/bin/{passwd,chfn,chsh} and /usr/sbin/{useradd,vipw}.
 corecmd_exec_bin(useradd_t)
 
+kernel_getattr_core_if(useradd_t)
+dev_dontaudit_getattr_all(useradd_t)
+
 domain_use_interactive_fds(useradd_t)
 domain_read_all_domains_state(useradd_t)
+domain_dontaudit_read_all_domains_state(useradd_t)
 
-files_manage_etc_files(useradd_t)
 files_search_var_lib(useradd_t)
 files_relabel_etc_files(useradd_t)
 files_read_etc_runtime_files(useradd_t)
@@ -462,6 +477,7 @@ fs_search_auto_mountpoints(useradd_t)
 fs_getattr_xattr_fs(useradd_t)
 
 mls_file_upgrade(useradd_t)
+mls_process_read_to_clearance(useradd_t)
 
 # Allow access to context for shadow file
 selinux_get_fs_mount(useradd_t)
@@ -472,6 +488,7 @@ selinux_compute_relabel_context(useradd_t)
 selinux_compute_user_contexts(useradd_t)
 
 term_use_all_inherited_terms(useradd_t)
+term_getattr_all_ptys(useradd_t)
 
 auth_domtrans_chk_passwd(useradd_t)
 auth_rw_lastlog(useradd_t)
@@ -479,6 +496,7 @@ auth_rw_faillog(useradd_t)
 auth_use_nsswitch(useradd_t)
 # these may be unnecessary due to the above
 # domtrans_chk_passwd() call.
+auth_manage_passwd(useradd_t)
 auth_manage_shadow(useradd_t)
 auth_relabel_shadow(useradd_t)
 auth_etc_filetrans_shadow(useradd_t)
@@ -496,6 +514,11 @@ seutil_read_file_contexts(useradd_t)
 seutil_read_default_contexts(useradd_t)
 seutil_domtrans_semanage(useradd_t)
 seutil_domtrans_setfiles(useradd_t)
+seutil_domtrans_loadpolicy(useradd_t)
+seutil_manage_bin_policy(useradd_t)
+seutil_manage_module_store(useradd_t)
+seutil_get_semanage_trans_lock(useradd_t)
+seutil_get_semanage_read_lock(useradd_t)
 
 userdom_use_unpriv_users_fds(useradd_t)
 # Add/remove user home directories
@@ -504,12 +527,6 @@ userdom_manage_home_role(system_r, useradd_t)
 
 mta_manage_spool(useradd_t)
 
-#ifdef(`distro_redhat',`
-#      optional_policy(`
-#              unconfined_domain(useradd_t)
-#      ')
-#')
-
 optional_policy(`
        apache_manage_all_user_content(useradd_t)
 ')