Skip to content

Commit

Permalink
Merge pull request SELinuxProject#626 from dsugar100/main
Browse files Browse the repository at this point in the history
Allow local login to read /run/motd
  • Loading branch information
pebenito authored Aug 2, 2023
2 parents 90d3f5c + a120ea8 commit 97e35d8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions policy/modules/system/authlogin.if
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,25 @@ interface(`auth_use_pam_motd_dynamic',`
files_runtime_filetrans($1, pam_motd_runtime_t, file, "motd.dynamic.new")
')

########################################
## <summary>
## Read the pam module motd with dynamic support during authentication.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`auth_read_pam_motd_dynamic',`
gen_require(`
type pam_motd_runtime_t;
')

files_search_runtime($1)
allow $1 pam_motd_runtime_t:file read_file_perms;
')

########################################
## <summary>
## Make the specified domain used for a login program.
Expand Down
1 change: 1 addition & 0 deletions policy/modules/system/locallogin.te
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ auth_manage_pam_runtime_dirs(local_login_t)
auth_manage_pam_runtime_files(local_login_t)
auth_manage_pam_console_data(local_login_t)
auth_domtrans_pam_console(local_login_t)
auth_read_pam_motd_dynamic(local_login_t)

init_dontaudit_use_fds(local_login_t)

Expand Down

0 comments on commit 97e35d8

Please sign in to comment.