2005-05-24 15:55:57 +00:00
|
|
|
## <summary>Common policy for authentication and user login.</summary>
|
2005-04-20 19:07:16 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
########################################
|
2005-12-08 17:42:08 +00:00
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Role access for password authentication.
|
2005-12-08 17:42:08 +00:00
|
|
|
## </summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Role allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-12-08 17:42:08 +00:00
|
|
|
## </param>
|
2008-11-05 16:10:46 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-12-08 17:42:08 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
interface(`auth_role',`
|
2005-12-08 17:42:08 +00:00
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type chkpwd_t, chkpwd_exec_t, shadow_t;
|
2005-09-16 19:36:10 +00:00
|
|
|
')
|
2005-12-08 17:42:08 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
role $1 types chkpwd_t;
|
2005-12-08 17:42:08 +00:00
|
|
|
|
|
|
|
# Transition from the user domain to this domain.
|
2008-11-05 16:10:46 +00:00
|
|
|
domtrans_pattern($2, chkpwd_exec_t, chkpwd_t)
|
2005-12-08 17:42:08 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
ps_process_pattern($2, chkpwd_t)
|
2007-10-02 16:04:50 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
dontaudit $2 shadow_t:file read_file_perms;
|
2005-08-25 20:27:20 +00:00
|
|
|
')
|
|
|
|
|
2010-03-18 12:59:25 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Use PAM for authentication.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_use_pam',`
|
|
|
|
|
|
|
|
# for SSP/ProPolice
|
|
|
|
dev_read_urand($1)
|
|
|
|
# for encrypted homedir
|
|
|
|
dev_read_sysfs($1)
|
|
|
|
|
2019-01-06 18:31:42 +00:00
|
|
|
auth_create_faillog_files($1)
|
2010-03-18 12:59:25 +00:00
|
|
|
auth_domtrans_chk_passwd($1)
|
|
|
|
auth_domtrans_upd_passwd($1)
|
|
|
|
auth_dontaudit_read_shadow($1)
|
|
|
|
auth_rw_lastlog($1)
|
|
|
|
auth_rw_faillog($1)
|
Update cron use to pam interface
I'm seeing a many denials for cron related to faillog_t, lastlog_t
and wtmp_t. These are all due to the fact cron is using pam (and my
system is configured with pam_faillog). I have updated cron to use
auth_use_pam interface to grant needed permissions.
Additional change to allow systemd_logind dbus for cron.
I have included many of the denials I'm seeing, but there are probably
others I didn't capture.
type=AVC msg=audit(1551411001.389:1281): avc: denied { read write } for pid=8807 comm="crond" name="lastlog" dev="dm-14" ino=102 scontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lastlog_t:s0 tclass=file permissive=1
type=AVC msg=audit(1551411001.389:1281): avc: denied { open } for pid=8807 comm="crond" path="/var/log/lastlog" dev="dm-14" ino=102 scontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lastlog_t:s0 tclass=file permissive=1
type=SYSCALL msg=audit(1551411001.389:1281): arch=c000003e syscall=2 success=yes exit=3 a0=7f94f608c2ee a1=2 a2=0 a3=75646f6d6d61705f items=1 ppid=7345 pid=8807 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=5 comm="crond" exe="/usr/sbin/crond" subj=system_u:system_r:crond_t:s0-s0:c0.c1023 key="logins"
type=AVC msg=audit(1551411001.389:1282): avc: denied { lock } for pid=8807 comm="crond" path="/var/log/lastlog" dev="dm-14" ino=102 scontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lastlog_t:s0 tclass=file permissive=1
type=SYSCALL msg=audit(1551411001.389:1282): arch=c000003e syscall=72 success=yes exit=0 a0=3 a1=6 a2=7ffc882a83d0 a3=75646f6d6d61705f items=0 ppid=7345 pid=8807 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=5 comm="crond" exe="/usr/sbin/crond" subj=system_u:system_r:crond_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1551411001.389:1283): avc: denied { write } for pid=8807 comm="crond" name="wtmp" dev="dm-14" ino=103 scontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tcontext=system_u:object_r:wtmp_t:s0 tclass=file permissive=1
type=AVC msg=audit(1551411001.389:1283): avc: denied { open } for pid=8807 comm="crond" path="/var/log/wtmp" dev="dm-14" ino=103 scontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tcontext=system_u:object_r:wtmp_t:s0 tclass=file permissive=1
type=AVC msg=audit(1551412201.489:1513): avc: denied { getattr } for pid=7323 comm="systemd-logind" path="/proc/9183/cgroup" dev="proc" ino=49836 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tclass=file permissive=1
type=AVC msg=audit(1551412201.511:1514): avc: denied { read write } for pid=9183 comm="crond" name="lastlog" dev="dm-14" ino=102 scontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lastlog_t:s0 tclass=file permissive=1
type=AVC msg=audit(1551412201.511:1514): avc: denied { open } for pid=9183 comm="crond" path="/var/log/lastlog" dev="dm-14" ino=102 scontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lastlog_t:s0 tclass=file permissive=1
type=AVC msg=audit(1551412201.511:1515): avc: denied { lock } for pid=9183 comm="crond" path="/var/log/lastlog" dev="dm-14" ino=102 scontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lastlog_t:s0 tclass=file permissive=1
type=SYSCALL msg=audit(1551412201.511:1515): arch=c000003e syscall=72 success=yes exit=0 a0=3 a1=6 a2=7ffc882a83d0 a3=75646f6d6d61705f items=0 ppid=7345 pid=9183 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=7 comm="crond" exe="/usr/sbin/crond" subj=system_u:system_r:crond_t:s0-s0:c0.c1023 key=(null)
type=USER_START msg=audit(1551412201.511:1516): pid=9183 uid=0 auid=0 ses=7 subj=system_u:system_r:crond_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_loginuid,pam_keyinit,pam_limits,pam_systemd,pam_lastlog acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
type=CRED_REFR msg=audit(1551412201.512:1517): pid=9183 uid=0 auid=0 ses=7 subj=system_u:system_r:crond_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_faillock,pam_unix acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
type=CRED_DISP msg=audit(1551412201.524:1521): pid=9183 uid=0 auid=0 ses=7 subj=system_u:system_r:crond_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_faillock,pam_unix acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
type=USER_END msg=audit(1551412201.525:1522): pid=9183 uid=0 auid=0 ses=7 subj=system_u:system_r:crond_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_loginuid,pam_keyinit,pam_limits,pam_systemd,pam_lastlog acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
type=USER_AVC msg=audit(1551629402.000:21914): pid=7387 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc: denied { send_msg } for msgtype=method_call interface=org.freedesktop.login1.Manager member=CreateSession dest=org.freedesktop.login1 spid=6407 tpid=7395 scontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tcontext=system_u:system_r:systemd_logind_t:s0 tclass=dbus exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
Signed-off-by: Dave Sugar <dsugar@tresys.com>
2019-03-05 22:33:50 +00:00
|
|
|
auth_rw_login_records($1)
|
2019-01-06 18:31:42 +00:00
|
|
|
auth_setattr_faillog_files($1)
|
2010-03-18 12:59:25 +00:00
|
|
|
auth_exec_pam($1)
|
|
|
|
auth_use_nsswitch($1)
|
|
|
|
|
|
|
|
logging_send_audit_msgs($1)
|
|
|
|
logging_send_syslog_msg($1)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
dbus_system_bus_client($1)
|
|
|
|
|
2011-03-31 17:29:59 +00:00
|
|
|
optional_policy(`
|
|
|
|
fprintd_dbus_chat($1)
|
|
|
|
')
|
2010-03-18 12:59:25 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
kerberos_manage_host_rcache($1)
|
|
|
|
kerberos_read_config($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
nis_authenticate($1)
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
2017-02-18 20:46:56 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Use the pam module systemd during authentication.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_use_pam_systemd',`
|
2017-02-26 17:08:02 +00:00
|
|
|
dbus_system_bus_client($1)
|
|
|
|
systemd_dbus_chat_logind($1)
|
2017-02-18 20:46:56 +00:00
|
|
|
')
|
|
|
|
|
2006-07-31 22:26:59 +00:00
|
|
|
########################################
|
2019-09-01 11:44:28 +00:00
|
|
|
## <summary>
|
|
|
|
## Use the pam module motd with dynamic support during authentication.
|
|
|
|
## This module comes from Ubuntu (https://bugs.launchpad.net/ubuntu/+source/pam/+bug/399071)
|
|
|
|
## and was added to Debian (https://sources.debian.org/src/pam/1.3.1-5/debian/patches-applied/update-motd/)
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_use_pam_motd_dynamic',`
|
|
|
|
gen_require(`
|
|
|
|
type pam_motd_runtime_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
# Allow pam_motd to run /usr/bin/env and /usr/bin/dash to generate
|
|
|
|
# /run/motd.dynamic from motd.dynamic.new.
|
|
|
|
corecmd_exec_bin($1)
|
|
|
|
corecmd_exec_shell($1)
|
|
|
|
|
|
|
|
allow $1 pam_motd_runtime_t:file manage_file_perms;
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_filetrans($1, pam_motd_runtime_t, file, "motd.dynamic.new")
|
2019-09-01 11:44:28 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2006-07-31 22:26:59 +00:00
|
|
|
## <summary>
|
|
|
|
## Make the specified domain used for a login program.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain type used for a login program domain.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_login_pgm_domain',`
|
2007-10-29 22:08:34 +00:00
|
|
|
gen_require(`
|
2009-06-12 15:30:15 +00:00
|
|
|
type var_auth_t, auth_cache_t;
|
2007-10-29 22:08:34 +00:00
|
|
|
')
|
2006-07-31 22:26:59 +00:00
|
|
|
|
|
|
|
domain_type($1)
|
|
|
|
domain_subj_id_change_exemption($1)
|
|
|
|
domain_role_change_exemption($1)
|
|
|
|
domain_obj_id_change_exemption($1)
|
|
|
|
role system_r types $1;
|
|
|
|
|
2010-03-18 12:59:25 +00:00
|
|
|
# Needed for pam_selinux_permit to cleanup properly
|
|
|
|
domain_read_all_domains_state($1)
|
|
|
|
domain_kill_all_domains($1)
|
|
|
|
|
|
|
|
# pam_keyring
|
|
|
|
allow $1 self:capability ipc_lock;
|
|
|
|
allow $1 self:process setkeycreate;
|
|
|
|
allow $1 self:key manage_key_perms;
|
|
|
|
|
2007-10-29 22:08:34 +00:00
|
|
|
files_list_var_lib($1)
|
|
|
|
manage_files_pattern($1, var_auth_t, var_auth_t)
|
|
|
|
|
2009-06-12 15:30:15 +00:00
|
|
|
manage_dirs_pattern($1, auth_cache_t, auth_cache_t)
|
|
|
|
manage_files_pattern($1, auth_cache_t, auth_cache_t)
|
|
|
|
manage_sock_files_pattern($1, auth_cache_t, auth_cache_t)
|
|
|
|
files_var_filetrans($1, auth_cache_t, dir)
|
|
|
|
|
2010-03-18 12:59:25 +00:00
|
|
|
# needed for afs - https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=253321
|
|
|
|
kernel_rw_afs_state($1)
|
|
|
|
|
2007-10-29 22:08:34 +00:00
|
|
|
# for fingerprint readers
|
|
|
|
dev_rw_input_dev($1)
|
|
|
|
dev_rw_generic_usb_dev($1)
|
2006-07-31 22:26:59 +00:00
|
|
|
|
|
|
|
files_read_etc_files($1)
|
|
|
|
|
2007-10-29 22:08:34 +00:00
|
|
|
fs_list_auto_mountpoints($1)
|
|
|
|
|
2006-07-31 22:26:59 +00:00
|
|
|
selinux_get_fs_mount($1)
|
|
|
|
selinux_validate_context($1)
|
|
|
|
selinux_compute_access_vector($1)
|
|
|
|
selinux_compute_create_context($1)
|
|
|
|
selinux_compute_relabel_context($1)
|
|
|
|
selinux_compute_user_contexts($1)
|
|
|
|
|
2007-08-20 18:26:08 +00:00
|
|
|
mls_file_read_all_levels($1)
|
|
|
|
mls_file_write_all_levels($1)
|
2006-07-31 22:26:59 +00:00
|
|
|
mls_file_upgrade($1)
|
|
|
|
mls_file_downgrade($1)
|
|
|
|
mls_process_set_level($1)
|
2007-02-16 23:01:42 +00:00
|
|
|
mls_fd_share_all_levels($1)
|
2006-07-31 22:26:59 +00:00
|
|
|
|
2010-03-18 12:59:25 +00:00
|
|
|
auth_use_pam($1)
|
2006-07-31 22:26:59 +00:00
|
|
|
|
|
|
|
init_rw_utmp($1)
|
|
|
|
|
2008-01-03 18:30:45 +00:00
|
|
|
logging_set_loginuid($1)
|
2010-03-18 12:59:25 +00:00
|
|
|
logging_set_tty_audit($1)
|
2006-07-31 22:26:59 +00:00
|
|
|
|
|
|
|
seutil_read_config($1)
|
|
|
|
seutil_read_default_contexts($1)
|
|
|
|
|
2017-02-24 01:03:23 +00:00
|
|
|
userdom_search_user_runtime($1)
|
|
|
|
userdom_read_user_tmpfs_files($1)
|
|
|
|
|
2006-10-31 21:01:48 +00:00
|
|
|
tunable_policy(`allow_polyinstantiation',`
|
2006-07-31 22:26:59 +00:00
|
|
|
files_polyinstantiate_all($1)
|
|
|
|
')
|
2017-02-24 01:03:23 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
systemd_read_logind_state($1)
|
|
|
|
systemd_write_inherited_logind_sessions_pipes($1)
|
|
|
|
systemd_use_passwd_agent_fds($1)
|
|
|
|
')
|
2006-07-31 22:26:59 +00:00
|
|
|
')
|
|
|
|
|
2005-08-25 20:27:20 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Use the login program as an entry point program.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-09 14:50:48 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_login_entry_type',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type login_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
domain_entry_file($1, login_exec_t)
|
2005-04-28 19:50:58 +00:00
|
|
|
')
|
|
|
|
|
2005-05-24 20:45:27 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute a login_program in the target domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="target_domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the login_program process.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-24 20:45:27 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_domtrans_login_program',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type login_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
corecmd_search_bin($1)
|
2011-02-28 14:22:26 +00:00
|
|
|
domtrans_pattern($1, login_exec_t, $2)
|
2005-05-24 20:45:27 +00:00
|
|
|
')
|
|
|
|
|
2006-10-04 17:25:34 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a login_program in the target domain,
|
|
|
|
## with a range transition.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-10-04 17:25:34 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="target_domain">
|
|
|
|
## <summary>
|
|
|
|
## The type of the login_program process.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="range">
|
|
|
|
## <summary>
|
|
|
|
## Range of the login program.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_ranged_domtrans_login_program',`
|
|
|
|
gen_require(`
|
|
|
|
type login_exec_t;
|
|
|
|
')
|
|
|
|
|
2011-02-28 14:22:26 +00:00
|
|
|
auth_domtrans_login_program($1, $2)
|
2006-10-04 17:25:34 +00:00
|
|
|
|
|
|
|
ifdef(`enable_mcs',`
|
|
|
|
range_transition $1 login_exec_t:process $3;
|
|
|
|
')
|
|
|
|
|
|
|
|
ifdef(`enable_mls',`
|
|
|
|
range_transition $1 login_exec_t:process $3;
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
2009-06-12 15:30:15 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Search authentication cache
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_search_cache',`
|
|
|
|
gen_require(`
|
|
|
|
type auth_cache_t;
|
|
|
|
')
|
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
allow $1 auth_cache_t:dir search_dir_perms;
|
2009-06-12 15:30:15 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read authentication cache
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_read_cache',`
|
|
|
|
gen_require(`
|
|
|
|
type auth_cache_t;
|
|
|
|
')
|
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
read_files_pattern($1, auth_cache_t, auth_cache_t)
|
2009-06-12 15:30:15 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read/Write authentication cache
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_rw_cache',`
|
|
|
|
gen_require(`
|
|
|
|
type auth_cache_t;
|
|
|
|
')
|
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
rw_files_pattern($1, auth_cache_t, auth_cache_t)
|
2009-06-12 15:30:15 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Manage authentication cache
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_manage_cache',`
|
|
|
|
gen_require(`
|
|
|
|
type auth_cache_t;
|
|
|
|
')
|
|
|
|
|
2010-03-18 12:59:25 +00:00
|
|
|
manage_dirs_pattern($1, auth_cache_t, auth_cache_t)
|
2009-06-26 14:40:13 +00:00
|
|
|
manage_files_pattern($1, auth_cache_t, auth_cache_t)
|
2009-06-12 15:30:15 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Automatic transition from cache_t to cache.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_var_filetrans_cache',`
|
|
|
|
gen_require(`
|
|
|
|
type auth_cache_t;
|
|
|
|
')
|
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
files_var_filetrans($1, auth_cache_t, { file dir } )
|
2009-06-12 15:30:15 +00:00
|
|
|
')
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Run unix_chkpwd to check a password.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-09 14:50:48 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_domtrans_chk_passwd',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type chkpwd_t, chkpwd_exec_t, shadow_t;
|
2009-06-12 15:30:15 +00:00
|
|
|
type auth_cache_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2009-06-12 15:30:15 +00:00
|
|
|
allow $1 auth_cache_t:dir search_dir_perms;
|
|
|
|
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin($1)
|
2008-11-05 16:10:46 +00:00
|
|
|
domtrans_pattern($1, chkpwd_exec_t, chkpwd_t)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2010-03-01 17:47:51 +00:00
|
|
|
dontaudit $1 shadow_t:file read_file_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-09-16 19:36:10 +00:00
|
|
|
dev_read_rand($1)
|
|
|
|
dev_read_urand($1)
|
|
|
|
|
2010-03-18 12:59:25 +00:00
|
|
|
auth_use_nsswitch($1)
|
|
|
|
auth_rw_faillog($1)
|
|
|
|
|
2007-06-12 18:46:14 +00:00
|
|
|
logging_send_audit_msgs($1)
|
|
|
|
|
2010-09-09 16:14:48 +00:00
|
|
|
miscfiles_read_generic_certs($1)
|
2005-10-21 15:38:22 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2010-03-18 12:59:25 +00:00
|
|
|
kerberos_read_keytab($1)
|
2005-06-27 16:30:55 +00:00
|
|
|
')
|
2005-09-16 19:36:10 +00:00
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
optional_policy(`
|
2020-06-27 21:11:48 +00:00
|
|
|
pcscd_read_runtime_files($1)
|
2007-02-16 23:01:42 +00:00
|
|
|
pcscd_stream_connect($1)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-02-02 21:08:12 +00:00
|
|
|
samba_stream_connect_winbind($1)
|
2005-09-16 19:36:10 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
')
|
2005-04-19 20:45:54 +00:00
|
|
|
|
2010-03-18 12:59:25 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Run unix_chkpwd to check a password.
|
|
|
|
## Stripped down version to be called within boolean
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2010-03-18 12:59:25 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_domtrans_chkpwd',`
|
|
|
|
gen_require(`
|
|
|
|
type chkpwd_t, chkpwd_exec_t, shadow_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
corecmd_search_bin($1)
|
|
|
|
domtrans_pattern($1, chkpwd_exec_t, chkpwd_t)
|
|
|
|
dontaudit $1 shadow_t:file { getattr read };
|
|
|
|
auth_domtrans_upd_passwd($1)
|
|
|
|
')
|
|
|
|
|
2007-10-29 22:08:34 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute chkpwd programs in the chkpwd domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2007-10-29 22:08:34 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
2007-11-28 18:39:47 +00:00
|
|
|
## The role to allow the chkpwd domain.
|
2007-10-29 22:08:34 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_run_chk_passwd',`
|
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type chkpwd_t;
|
2007-10-29 22:08:34 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
auth_domtrans_chk_passwd($1)
|
2008-11-05 16:10:46 +00:00
|
|
|
role $2 types chkpwd_t;
|
2007-10-29 22:08:34 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a domain transition to run unix_update.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to transition.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_domtrans_upd_passwd',`
|
|
|
|
gen_require(`
|
|
|
|
type updpwd_t, updpwd_exec_t;
|
|
|
|
')
|
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
domtrans_pattern($1, updpwd_exec_t, updpwd_t)
|
2007-10-29 22:08:34 +00:00
|
|
|
auth_dontaudit_read_shadow($1)
|
|
|
|
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute updpwd programs in the updpwd domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2007-10-29 22:08:34 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## The role to allow the updpwd domain.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_run_upd_passwd',`
|
|
|
|
gen_require(`
|
|
|
|
type updpwd_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
auth_domtrans_upd_passwd($1)
|
|
|
|
role $2 types updpwd_t;
|
|
|
|
')
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
########################################
|
2005-07-13 20:48:51 +00:00
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the shadow passwords file.
|
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-10 18:09:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-09 14:50:48 +00:00
|
|
|
#
|
2005-07-13 20:48:51 +00:00
|
|
|
interface(`auth_getattr_shadow',`
|
|
|
|
gen_require(`
|
|
|
|
type shadow_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
|
|
|
allow $1 shadow_t:file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of the shadow passwords file.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-13 20:48:51 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-13 20:48:51 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_dontaudit_getattr_shadow',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type shadow_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 shadow_t:file getattr;
|
2005-05-23 17:56:26 +00:00
|
|
|
')
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read the shadow passwords file (/etc/shadow)
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-10 18:09:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-09 14:50:48 +00:00
|
|
|
#
|
2011-02-28 14:22:26 +00:00
|
|
|
# cjp: these next three interfaces are split
|
2006-01-06 22:51:40 +00:00
|
|
|
# since typeattribute does not work in conditionals
|
|
|
|
# yet, otherwise they should be one interface.
|
2011-02-28 14:22:26 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_read_shadow',`
|
2006-01-06 22:51:40 +00:00
|
|
|
auth_can_read_shadow_passwords($1)
|
|
|
|
auth_tunable_read_shadow($1)
|
|
|
|
')
|
|
|
|
|
2021-01-20 10:17:17 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Map the shadow passwords file (/etc/shadow)
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_map_shadow',`
|
|
|
|
gen_require(`
|
|
|
|
type shadow_t;
|
|
|
|
')
|
|
|
|
allow $1 shadow_t:file map;
|
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Pass shadow assertion for reading.
|
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Pass shadow assertion for reading.
|
|
|
|
## This should only be used with
|
|
|
|
## auth_tunable_read_shadow(), and
|
|
|
|
## only exists because typeattribute
|
|
|
|
## does not work in conditionals.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2006-01-06 22:51:40 +00:00
|
|
|
interface(`auth_can_read_shadow_passwords',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute can_read_shadow_passwords;
|
2006-01-06 22:51:40 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
typeattribute $1 can_read_shadow_passwords;
|
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read the shadow password file.
|
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Read the shadow password file. This
|
|
|
|
## should only be used in a conditional;
|
|
|
|
## it does not pass the reading shadow
|
|
|
|
## assertion.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2006-01-06 22:51:40 +00:00
|
|
|
interface(`auth_tunable_read_shadow',`
|
|
|
|
gen_require(`
|
2005-06-20 17:41:29 +00:00
|
|
|
type shadow_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_list_etc($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 shadow_t:file read_file_perms;
|
2005-04-19 20:45:54 +00:00
|
|
|
')
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Do not audit attempts to read the shadow
|
|
|
|
## password file (/etc/shadow).
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-09 14:50:48 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_dontaudit_read_shadow',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type shadow_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-11-04 14:37:05 +00:00
|
|
|
dontaudit $1 shadow_t:file read_file_perms;
|
2005-04-19 20:45:54 +00:00
|
|
|
')
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read and write the shadow password file (/etc/shadow).
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-10 18:09:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-09 14:50:48 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_rw_shadow',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute can_read_shadow_passwords, can_write_shadow_passwords;
|
|
|
|
type shadow_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_list_etc($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 shadow_t:file rw_file_perms;
|
|
|
|
typeattribute $1 can_read_shadow_passwords, can_write_shadow_passwords;
|
2005-04-19 20:45:54 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete the shadow
|
|
|
|
## password file.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-09 18:50:20 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_manage_shadow',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute can_read_shadow_passwords, can_write_shadow_passwords;
|
|
|
|
type shadow_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-08-17 15:35:14 +00:00
|
|
|
allow $1 shadow_t:file manage_file_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 can_read_shadow_passwords, can_write_shadow_passwords;
|
2005-05-09 18:50:20 +00:00
|
|
|
')
|
|
|
|
|
2006-05-03 20:29:14 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
2006-05-10 18:09:08 +00:00
|
|
|
## Automatic transition from etc to shadow.
|
2006-05-03 20:29:14 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2021-02-01 04:57:13 +00:00
|
|
|
## <param name="name" optional="true">
|
|
|
|
## <summary>
|
|
|
|
## The name of the object being created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-05-03 20:29:14 +00:00
|
|
|
#
|
|
|
|
interface(`auth_etc_filetrans_shadow',`
|
|
|
|
gen_require(`
|
|
|
|
type shadow_t;
|
|
|
|
')
|
|
|
|
|
2021-02-01 04:57:13 +00:00
|
|
|
files_etc_filetrans($1, shadow_t, file, $2)
|
2006-05-03 20:29:14 +00:00
|
|
|
')
|
|
|
|
|
2005-05-09 18:50:20 +00:00
|
|
|
#######################################
|
2005-11-25 15:51:50 +00:00
|
|
|
## <summary>
|
|
|
|
## Relabel to the shadow
|
|
|
|
## password file type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-25 15:51:50 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-25 15:51:50 +00:00
|
|
|
## </param>
|
2005-05-09 18:50:20 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_relabelto_shadow',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute can_relabelto_shadow_passwords;
|
|
|
|
type shadow_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
files_search_etc($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 shadow_t:file relabelto;
|
|
|
|
typeattribute $1 can_relabelto_shadow_passwords;
|
2005-05-09 18:50:20 +00:00
|
|
|
')
|
|
|
|
|
2005-11-25 15:51:50 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Relabel from and to the shadow
|
|
|
|
## password file type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-25 15:51:50 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-25 15:51:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_relabel_shadow',`
|
|
|
|
gen_require(`
|
|
|
|
attribute can_relabelto_shadow_passwords;
|
|
|
|
type shadow_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
2011-03-31 17:29:59 +00:00
|
|
|
allow $1 shadow_t:file relabel_file_perms;
|
2005-11-25 15:51:50 +00:00
|
|
|
typeattribute $1 can_relabelto_shadow_passwords;
|
|
|
|
')
|
|
|
|
|
2005-09-16 21:20:37 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Append to the login failure log.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-16 21:20:37 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-16 21:20:37 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_append_faillog',`
|
|
|
|
gen_require(`
|
|
|
|
type faillog_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
logging_search_logs($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 faillog_t:file append_file_perms;
|
2005-09-16 21:20:37 +00:00
|
|
|
')
|
|
|
|
|
2019-01-06 18:31:42 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create fail log lock (in /run/faillock).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_create_faillog_files',`
|
|
|
|
gen_require(`
|
|
|
|
type faillog_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
create_files_pattern($1, faillog_t, faillog_t)
|
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the login failure log.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-31 19:52:57 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_rw_faillog',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type faillog_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
logging_search_logs($1)
|
2005-06-20 17:41:29 +00:00
|
|
|
allow $1 faillog_t:file rw_file_perms;
|
2005-05-31 19:52:57 +00:00
|
|
|
')
|
|
|
|
|
2015-10-23 14:16:59 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Manage the login failure logs.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_manage_faillog',`
|
|
|
|
gen_require(`
|
|
|
|
type faillog_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 faillog_t:file manage_file_perms;
|
|
|
|
logging_rw_generic_log_dirs($1)
|
|
|
|
')
|
2019-01-06 18:31:42 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Setattr the login failure logs.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_setattr_faillog_files',`
|
|
|
|
gen_require(`
|
|
|
|
type faillog_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
setattr_files_pattern($1, faillog_t, faillog_t)
|
|
|
|
')
|
2015-10-23 14:16:59 +00:00
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
#######################################
|
2005-10-07 21:45:04 +00:00
|
|
|
## <summary>
|
|
|
|
## Read the last logins log.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-07 21:45:04 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-07 21:45:04 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-10-07 21:45:04 +00:00
|
|
|
interface(`auth_read_lastlog',`
|
|
|
|
gen_require(`
|
|
|
|
type lastlog_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
logging_search_logs($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 lastlog_t:file read_file_perms;
|
2005-10-07 21:45:04 +00:00
|
|
|
')
|
|
|
|
|
2005-10-19 19:45:20 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Append only to the last logins log.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-19 19:45:20 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-19 19:45:20 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_append_lastlog',`
|
|
|
|
gen_require(`
|
|
|
|
type lastlog_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
logging_search_logs($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 lastlog_t:file { append_file_perms lock };
|
2005-10-19 19:45:20 +00:00
|
|
|
')
|
|
|
|
|
2019-01-04 07:33:12 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## relabel the last logins log.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_relabel_lastlog',`
|
|
|
|
gen_require(`
|
|
|
|
type lastlog_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
logging_search_logs($1)
|
2020-08-14 14:33:08 +00:00
|
|
|
allow $1 lastlog_t:file relabel_file_perms;
|
2019-01-04 07:33:12 +00:00
|
|
|
')
|
|
|
|
|
2005-10-07 21:45:04 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write to the last logins log.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-07 21:45:04 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-07 21:45:04 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_rw_lastlog',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type lastlog_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
logging_search_logs($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 lastlog_t:file { rw_file_perms lock setattr };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2019-01-04 07:33:12 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Manage the last logins log.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_manage_lastlog',`
|
|
|
|
gen_require(`
|
|
|
|
type lastlog_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 lastlog_t:file manage_file_perms;
|
|
|
|
logging_rw_generic_log_dirs($1)
|
|
|
|
')
|
|
|
|
|
2005-05-24 15:55:57 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute pam programs in the pam domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-04 17:01:46 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_domtrans_pam',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type pam_t, pam_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
domtrans_pattern($1, pam_exec_t, pam_t)
|
2005-05-04 17:01:46 +00:00
|
|
|
')
|
|
|
|
|
2007-10-29 22:08:34 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2009-06-12 15:30:15 +00:00
|
|
|
## Send generic signals to pam processes.
|
2007-10-29 22:08:34 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_signal_pam',`
|
|
|
|
gen_require(`
|
|
|
|
type pam_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 pam_t:process signal;
|
|
|
|
')
|
|
|
|
|
2005-05-24 15:55:57 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute pam programs in the PAM domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The role to allow the PAM domain.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-24 15:55:57 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_run_pam',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type pam_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
auth_domtrans_pam($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types pam_t;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute the pam program.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-10 18:09:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-09 14:50:48 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_exec_pam',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type pam_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
can_exec($1, pam_exec_t)
|
2005-05-04 17:01:46 +00:00
|
|
|
')
|
|
|
|
|
2011-03-31 17:29:59 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read var auth files. Used by various other applications
|
|
|
|
## and pam applets etc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_read_var_auth',`
|
|
|
|
gen_require(`
|
|
|
|
type var_auth_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_var($1)
|
|
|
|
read_files_pattern($1, var_auth_t, var_auth_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write var auth files. Used by various other applications
|
|
|
|
## and pam applets etc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_rw_var_auth',`
|
|
|
|
gen_require(`
|
|
|
|
type var_auth_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_var($1)
|
|
|
|
rw_files_pattern($1, var_auth_t, var_auth_t)
|
|
|
|
')
|
|
|
|
|
2006-01-18 16:40:04 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Manage var auth files. Used by various other applications
|
|
|
|
## and pam applets etc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-10 18:09:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-18 16:40:04 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_manage_var_auth',`
|
|
|
|
gen_require(`
|
|
|
|
type var_auth_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_var($1)
|
2006-08-17 15:35:14 +00:00
|
|
|
allow $1 var_auth_t:dir manage_dir_perms;
|
2006-01-18 16:40:04 +00:00
|
|
|
allow $1 var_auth_t:file rw_file_perms;
|
2008-10-16 16:09:20 +00:00
|
|
|
allow $1 var_auth_t:lnk_file rw_lnk_file_perms;
|
2006-01-18 16:40:04 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2020-06-27 20:49:41 +00:00
|
|
|
## Read PAM PID files. (Deprecated)
|
2006-05-10 18:09:08 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-02 18:41:20 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_read_pam_pid',`
|
2020-06-27 20:49:41 +00:00
|
|
|
refpolicywarn(`$0($*) has been deprecated, please use auth_read_pam_runtime_files() instead.')
|
|
|
|
auth_read_pam_runtime_files($1)
|
2005-05-02 18:41:20 +00:00
|
|
|
')
|
|
|
|
|
2005-11-29 21:27:15 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
2020-08-11 13:01:34 +00:00
|
|
|
## Do not audit attempts to read PAM PID files. (Deprecated)
|
2005-11-29 21:27:15 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-29 21:27:15 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-29 21:27:15 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_dontaudit_read_pam_pid',`
|
2020-06-27 20:49:41 +00:00
|
|
|
refpolicywarn(`$0($*) has been deprecated, please use auth_dontaudit_read_pam_runtime_files() instead.')
|
|
|
|
auth_dontaudit_read_pam_runtime_files($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create specified objects in
|
|
|
|
## pid directories with the pam var
|
|
|
|
## run file type using a
|
|
|
|
## file type transition. (Deprecated)
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="object_class">
|
|
|
|
## <summary>
|
|
|
|
## Class of the object being created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="name" optional="true">
|
|
|
|
## <summary>
|
|
|
|
## The name of the object being created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_pid_filetrans_pam_var_run',`
|
|
|
|
refpolicywarn(`$0($*) has been deprecated, please use auth_runtime_filetrans_pam_runtime() instead.')
|
|
|
|
auth_runtime_filetrans_pam_runtime($1, $2, $3)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Delete pam PID files. (Deprecated)
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_delete_pam_pid',`
|
|
|
|
refpolicywarn(`$0($*) has been deprecated, please use auth_delete_pam_runtime_files() instead.')
|
|
|
|
auth_delete_pam_runtime_files($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Manage pam PID files. (Deprecated)
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_manage_pam_pid',`
|
|
|
|
refpolicywarn(`$0($*) has been deprecated, please use auth_manage_pam_runtime_dirs(); auth_manage_pam_runtime_files() instead.')
|
|
|
|
auth_manage_pam_runtime_dirs($1)
|
|
|
|
auth_manage_pam_runtime_files($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Manage pam runtime dirs.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_manage_pam_runtime_dirs',`
|
2005-11-29 21:27:15 +00:00
|
|
|
gen_require(`
|
2019-09-08 20:55:02 +00:00
|
|
|
type pam_runtime_t;
|
2005-11-29 21:27:15 +00:00
|
|
|
')
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2020-06-27 20:49:41 +00:00
|
|
|
manage_dirs_pattern($1, pam_runtime_t, pam_runtime_t)
|
2005-11-29 21:27:15 +00:00
|
|
|
')
|
|
|
|
|
2014-11-22 21:16:35 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create specified objects in
|
2020-06-27 20:49:41 +00:00
|
|
|
## pid directories with the pam runtime
|
|
|
|
## file type using a type transition.
|
2014-11-22 21:16:35 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="object_class">
|
|
|
|
## <summary>
|
|
|
|
## Class of the object being created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="name" optional="true">
|
|
|
|
## <summary>
|
|
|
|
## The name of the object being created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2020-06-27 20:49:41 +00:00
|
|
|
interface(`auth_runtime_filetrans_pam_runtime',`
|
2014-11-22 21:16:35 +00:00
|
|
|
gen_require(`
|
2019-09-08 20:55:02 +00:00
|
|
|
type pam_runtime_t;
|
2014-11-22 21:16:35 +00:00
|
|
|
')
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_filetrans($1, pam_runtime_t, $2, $3)
|
2014-11-22 21:16:35 +00:00
|
|
|
')
|
|
|
|
|
2005-06-09 14:50:48 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2020-06-27 20:49:41 +00:00
|
|
|
## Read PAM runtime files.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-10 18:09:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-09 14:50:48 +00:00
|
|
|
#
|
2020-06-27 20:49:41 +00:00
|
|
|
interface(`auth_read_pam_runtime_files',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2019-09-08 20:55:02 +00:00
|
|
|
type pam_runtime_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2020-06-27 20:49:41 +00:00
|
|
|
allow $1 pam_runtime_t:dir list_dir_perms;
|
|
|
|
allow $1 pam_runtime_t:file read_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
2020-08-11 13:01:34 +00:00
|
|
|
## Do not audit attempts to read PAM runtime files.
|
2020-06-27 20:49:41 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_dontaudit_read_pam_runtime_files',`
|
|
|
|
gen_require(`
|
|
|
|
type pam_runtime_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 pam_runtime_t:file { getattr read };
|
2005-05-03 20:23:33 +00:00
|
|
|
')
|
|
|
|
|
2006-01-18 16:40:04 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2020-06-27 20:49:41 +00:00
|
|
|
## Delete pam runtime files.
|
2006-01-18 16:40:04 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-10 18:09:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-18 16:40:04 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2020-06-27 20:49:41 +00:00
|
|
|
interface(`auth_delete_pam_runtime_files',`
|
|
|
|
gen_require(`
|
|
|
|
type pam_runtime_t;
|
|
|
|
')
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2020-06-27 20:49:41 +00:00
|
|
|
delete_files_pattern($1, pam_runtime_t, pam_runtime_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete pam runtime files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_manage_pam_runtime_files',`
|
2006-01-18 16:40:04 +00:00
|
|
|
gen_require(`
|
2019-09-08 20:55:02 +00:00
|
|
|
type pam_runtime_t;
|
2006-01-18 16:40:04 +00:00
|
|
|
')
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2020-06-27 20:49:41 +00:00
|
|
|
manage_files_pattern($1, pam_runtime_t, pam_runtime_t)
|
2006-01-18 16:40:04 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute pam_console with a domain transition.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-05-10 18:09:08 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-04 17:01:46 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_domtrans_pam_console',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type pam_console_t, pam_console_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
domtrans_pattern($1, pam_console_exec_t, pam_console_t)
|
2005-05-04 17:01:46 +00:00
|
|
|
')
|
|
|
|
|
2005-11-29 15:49:18 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Search the contents of the
|
|
|
|
## pam_console data directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-10 18:09:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-29 15:49:18 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_search_pam_console_data',`
|
|
|
|
gen_require(`
|
|
|
|
type pam_var_console_t;
|
|
|
|
')
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2005-11-29 15:49:18 +00:00
|
|
|
allow $1 pam_var_console_t:dir search_dir_perms;
|
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## List the contents of the pam_console
|
|
|
|
## data directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-30 21:17:20 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_list_pam_console_data',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type pam_var_console_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2006-08-17 15:35:14 +00:00
|
|
|
allow $1 pam_var_console_t:dir list_dir_perms;
|
2005-05-30 21:17:20 +00:00
|
|
|
')
|
|
|
|
|
2012-12-05 20:39:25 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create pam var console pid directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_create_pam_console_data_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type pam_var_console_t;
|
|
|
|
')
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2012-12-05 20:39:25 +00:00
|
|
|
allow $1 pam_var_console_t:dir create_dir_perms;
|
|
|
|
')
|
|
|
|
|
2011-03-31 17:29:59 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Relabel pam_console data directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_relabel_pam_console_data_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type pam_var_console_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
relabel_dirs_pattern($1, pam_var_console_t, pam_var_console_t)
|
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read pam_console data files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-04 17:01:46 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_read_pam_console_data',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type pam_var_console_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2006-08-17 15:35:14 +00:00
|
|
|
allow $1 pam_var_console_t:dir list_dir_perms;
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 pam_var_console_t:file read_file_perms;
|
2005-05-04 17:01:46 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete
|
|
|
|
## pam_console data files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-04 17:01:46 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_manage_pam_console_data',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type pam_var_console_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
manage_files_pattern($1, pam_var_console_t, pam_var_console_t)
|
|
|
|
manage_lnk_files_pattern($1, pam_var_console_t, pam_var_console_t)
|
2005-05-04 17:01:46 +00:00
|
|
|
')
|
|
|
|
|
2005-09-19 21:17:45 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Delete pam_console data.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-19 21:17:45 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_delete_pam_console_data',`
|
|
|
|
gen_require(`
|
|
|
|
type pam_var_console_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_var($1)
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
delete_files_pattern($1, pam_var_console_t, pam_var_console_t)
|
2005-09-19 21:17:45 +00:00
|
|
|
')
|
|
|
|
|
2011-07-14 14:59:15 +00:00
|
|
|
########################################
|
2012-12-05 20:39:25 +00:00
|
|
|
## <summary>
|
|
|
|
## Create specified objects in
|
|
|
|
## pid directories with the pam var
|
|
|
|
## console pid file type using a
|
2020-06-27 20:49:41 +00:00
|
|
|
## file type transition. (Deprecated)
|
2012-12-05 20:39:25 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="object_class">
|
|
|
|
## <summary>
|
|
|
|
## Class of the object being created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="name" optional="true">
|
|
|
|
## <summary>
|
|
|
|
## The name of the object being created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_pid_filetrans_pam_var_console',`
|
2020-06-27 20:49:41 +00:00
|
|
|
refpolicywarn(`$0($*) has been deprecated, please use auth_runtime_filetrans_pam_var_console() instead.')
|
|
|
|
auth_runtime_filetrans_pam_var_console($1, $2, $3)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create specified objects in generic
|
|
|
|
## runtime directories with the pam var
|
|
|
|
## console runtime file type using a
|
|
|
|
## file type transition.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="object_class">
|
|
|
|
## <summary>
|
|
|
|
## Class of the object being created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="name" optional="true">
|
|
|
|
## <summary>
|
|
|
|
## The name of the object being created.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_runtime_filetrans_pam_var_console',`
|
2012-12-05 20:39:25 +00:00
|
|
|
gen_require(`
|
|
|
|
type pam_var_console_t;
|
|
|
|
')
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_filetrans($1, pam_var_console_t, $2, $3)
|
2012-12-05 20:39:25 +00:00
|
|
|
')
|
|
|
|
|
2005-05-24 15:55:57 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute utempter programs in the utempter domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-24 15:55:57 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_domtrans_utempter',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type utempter_t, utempter_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
domtrans_pattern($1, utempter_exec_t, utempter_t)
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute utempter programs in the utempter domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The role to allow the utempter domain.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-24 15:55:57 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_run_utempter',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type utempter_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
auth_domtrans_utempter($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types utempter_t;
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2006-01-11 18:10:49 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
2020-08-11 13:01:34 +00:00
|
|
|
## Do not audit attempts to execute utempter executable.
|
2006-01-11 18:10:49 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-11 18:10:49 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-11 18:10:49 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_dontaudit_exec_utempter',`
|
|
|
|
gen_require(`
|
|
|
|
type utempter_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 utempter_exec_t:file { execute execute_no_trans };
|
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of login record files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-01-17 17:50:10 +00:00
|
|
|
#
|
|
|
|
interface(`auth_setattr_login_records',`
|
|
|
|
gen_require(`
|
|
|
|
type wtmp_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 wtmp_t:file setattr;
|
|
|
|
logging_search_logs($1)
|
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read login records files (/var/log/wtmp).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-16 21:10:33 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_read_login_records',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type wtmp_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
logging_search_logs($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 wtmp_t:file read_file_perms;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
2010-03-18 12:59:25 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read login records
|
|
|
|
## files (/var/log/wtmp).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain to not audit.
|
2010-03-18 12:59:25 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`auth_dontaudit_read_login_records',`
|
|
|
|
gen_require(`
|
|
|
|
type wtmp_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 wtmp_t:file read_file_perms;
|
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to write to
|
|
|
|
## login records files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-16 21:10:33 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_dontaudit_write_login_records',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type wtmp_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 wtmp_t:file write;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
2005-10-05 19:52:53 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Append to login records (wtmp).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-05 19:52:53 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-05 19:52:53 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_append_login_records',`
|
|
|
|
gen_require(`
|
|
|
|
type wtmp_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 wtmp_t:file append_file_perms;
|
|
|
|
logging_search_logs($1)
|
2005-10-05 19:52:53 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Write to login records (wtmp).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-05 19:52:53 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-05 19:52:53 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_write_login_records',`
|
|
|
|
gen_require(`
|
|
|
|
type wtmp_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 wtmp_t:file { write_file_perms lock };
|
2005-10-05 19:52:53 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write login records.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-16 21:10:33 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`auth_rw_login_records',`
|
2005-06-16 20:54:18 +00:00
|
|
|
gen_require(`
|
|
|
|
type wtmp_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 wtmp_t:file rw_file_perms;
|
2005-06-13 17:35:46 +00:00
|
|
|
logging_search_logs($1)
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create a login records in the log directory
|
|
|
|
## using a type transition.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-08-05 14:32:12 +00:00
|
|
|
#
|
2006-02-21 18:40:44 +00:00
|
|
|
interface(`auth_log_filetrans_login_records',`
|
2005-08-05 14:32:12 +00:00
|
|
|
gen_require(`
|
|
|
|
type wtmp_t;
|
|
|
|
')
|
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
logging_log_filetrans($1, wtmp_t, file)
|
2005-08-05 14:32:12 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete login
|
|
|
|
## records files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-06-28 20:54:49 +00:00
|
|
|
#
|
|
|
|
interface(`auth_manage_login_records',`
|
|
|
|
gen_require(`
|
|
|
|
type wtmp_t;
|
|
|
|
')
|
|
|
|
|
2006-02-02 21:08:12 +00:00
|
|
|
logging_rw_generic_log_dirs($1)
|
2006-08-17 15:35:14 +00:00
|
|
|
allow $1 wtmp_t:file manage_file_perms;
|
2005-06-28 20:54:49 +00:00
|
|
|
')
|
2005-07-19 18:40:19 +00:00
|
|
|
|
2011-03-31 17:29:59 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Relabel login record files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_relabel_login_records',`
|
|
|
|
gen_require(`
|
|
|
|
type wtmp_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 wtmp_t:file relabel_file_perms;
|
|
|
|
')
|
|
|
|
|
2005-10-13 20:59:36 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-03-03 15:37:37 +00:00
|
|
|
## Use nsswitch to look up user, password, group, or
|
|
|
|
## host information.
|
2005-10-13 20:59:36 +00:00
|
|
|
## </summary>
|
2010-03-03 15:37:37 +00:00
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Allow the specified domain to look up user, password,
|
|
|
|
## group, or host information using the name service.
|
|
|
|
## The most common use of this interface is for services
|
|
|
|
## that do host name resolution (usually DNS resolution).
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
2005-10-13 20:59:36 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-13 20:59:36 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-13 20:59:36 +00:00
|
|
|
## </param>
|
2010-03-03 15:37:37 +00:00
|
|
|
## <infoflow type="both" weight="10"/>
|
2005-10-13 20:59:36 +00:00
|
|
|
#
|
|
|
|
interface(`auth_use_nsswitch',`
|
2016-12-15 00:01:32 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute nsswitch_domain;
|
|
|
|
')
|
2005-11-15 16:34:10 +00:00
|
|
|
|
2012-07-10 12:43:31 +00:00
|
|
|
typeattribute $1 nsswitch_domain;
|
2005-10-13 20:59:36 +00:00
|
|
|
')
|
|
|
|
|
2005-07-19 18:40:19 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Unconfined access to the authlogin module.
|
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Unconfined access to the authlogin module.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## Currently, this only allows assertions for
|
|
|
|
## the shadow passwords file (/etc/shadow) to
|
|
|
|
## be passed. No access is granted yet.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-19 18:40:19 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-19 18:40:19 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`auth_unconfined',`
|
|
|
|
gen_require(`
|
|
|
|
attribute can_read_shadow_passwords;
|
|
|
|
attribute can_write_shadow_passwords;
|
|
|
|
attribute can_relabelto_shadow_passwords;
|
|
|
|
')
|
|
|
|
|
|
|
|
typeattribute $1 can_read_shadow_passwords;
|
|
|
|
typeattribute $1 can_write_shadow_passwords;
|
|
|
|
typeattribute $1 can_relabelto_shadow_passwords;
|
|
|
|
')
|