Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion policy/modules/admin/dpkg.te
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ term_use_all_terms(dpkg_script_t)

files_manage_non_auth_files(dpkg_script_t)

auth_etc_filetrans_shadow(dpkg_script_t, "shadow.upwd-write")
auth_etc_filetrans_shadow(dpkg_script_t)
auth_manage_shadow(dpkg_script_t)

init_all_labeled_script_domtrans(dpkg_script_t)
Expand Down
21 changes: 14 additions & 7 deletions policy/modules/system/authlogin.if
Original file line number Diff line number Diff line change
Expand Up @@ -732,18 +732,22 @@ interface(`auth_manage_shadow',`
## Domain allowed access.
## </summary>
## </param>
## <param name="name" optional="true">
## <summary>
## The name of the object being created.
## </summary>
## </param>
Comment on lines -735 to -739
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep this block, but add (Deprecated) to the summary, since the interface still responds to the parameter.

Otherwise looks good to me.

#
interface(`auth_etc_filetrans_shadow',`
gen_require(`
type shadow_t;
')

files_etc_filetrans($1, shadow_t, file, $2)
ifelse(`$2',`',`
files_etc_filetrans($1, shadow_t, file, "shadow")
files_etc_filetrans($1, shadow_t, file, "shadow-")
files_etc_filetrans($1, shadow_t, file, "shadow.upwd-write")
files_etc_filetrans($1, shadow_t, file, "gshadow")
files_etc_filetrans($1, shadow_t, file, "gshadow-")
',`
refpolicywarn(`$0($*) second parameter is deprecated.')
files_etc_filetrans($1, shadow_t, file, $2)
')
')

########################################
Expand Down Expand Up @@ -862,7 +866,10 @@ interface(`auth_rw_shadow_lock',`
type shadow_lock_t;
')

rw_files_pattern($1, shadow_lock_t, shadow_lock_t)
allow $1 shadow_lock_t:file rw_file_perms;
files_etc_filetrans($1, shadow_lock_t, file, ".pwd.lock")
files_etc_filetrans($1, shadow_lock_t, file, "passwd.lock")
files_etc_filetrans($1, shadow_lock_t, file, "group.lock")
')

########################################
Expand Down
1 change: 1 addition & 0 deletions policy/modules/system/authlogin.te
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ term_dontaudit_use_console(updpwd_t)
term_dontaudit_use_unallocated_ttys(updpwd_t)

auth_manage_shadow(updpwd_t)
auth_etc_filetrans_shadow(updpwd_t)
auth_use_nsswitch(updpwd_t)

logging_send_syslog_msg(updpwd_t)
Expand Down
Loading