debian motd.d directory (#689)

* policy for Debian motd.d dir

Signed-off-by: Russell Coker <russell@coker.com.au>
This commit is contained in:
Russell Coker 2023-09-22 00:21:25 +10:00 committed by GitHub
parent 227786eed7
commit e349de1507
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -477,6 +477,7 @@ auth_manage_pam_runtime_dirs(xdm_t)
auth_manage_pam_runtime_files(xdm_t)
auth_manage_pam_console_data(xdm_t)
auth_read_shadow_history(xdm_t)
auth_use_pam_motd_dynamic(xdm_t)
auth_write_login_records(xdm_t)
# Run telinit->init to shutdown.

View File

@ -59,6 +59,7 @@ ifdef(`distro_suse', `
/run/motd -- gen_context(system_u:object_r:pam_motd_runtime_t,s0)
/run/motd\.dynamic -- gen_context(system_u:object_r:pam_motd_runtime_t,s0)
/run/motd\.dynamic\.new -- gen_context(system_u:object_r:pam_motd_runtime_t,s0)
/run/motd\.d(/.*)? gen_context(system_u:object_r:pam_motd_runtime_t,s0)
/run/pam_mount(/.*)? gen_context(system_u:object_r:pam_runtime_t,s0)
/run/pam_ssh(/.*)? gen_context(system_u:object_r:var_auth_t,s0)
/run/sepermit(/.*)? gen_context(system_u:object_r:pam_runtime_t,s0)

View File

@ -115,6 +115,7 @@ interface(`auth_use_pam_motd_dynamic',`
corecmd_exec_shell($1)
allow $1 pam_motd_runtime_t:file manage_file_perms;
allow $1 pam_motd_runtime_t:dir rw_dir_perms;
files_runtime_filetrans($1, pam_motd_runtime_t, file, "motd.dynamic.new")
')