Skip to content

Commit

Permalink
Add file context for ~/.config/Yubico
Browse files Browse the repository at this point in the history
Add file context specification for ~/.config/Yubico in addition to
existing ~/.yubico. Update the auth_filetrans_home_content() and
auth_filetrans_admin_home_content() interfaces accordingly.

Resolves: rhbz#1860888
  • Loading branch information
zpytela committed Aug 24, 2020
1 parent 204a23c commit 71e1989
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions policy/modules/system/authlogin.fc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
HOME_DIR/\.yubico(/.*)? gen_context(system_u:object_r:auth_home_t,s0)
HOME_DIR/\.config/Yubico(/.*)? gen_context(system_u:object_r:auth_home_t,s0)
HOME_DIR/\.google_authenticator gen_context(system_u:object_r:auth_home_t,s0)
HOME_DIR/\.google_authenticator~ gen_context(system_u:object_r:auth_home_t,s0)
/root/\.yubico(/.*)? gen_context(system_u:object_r:auth_home_t,s0)
/root/\.config/Yubico(/.*)? gen_context(system_u:object_r:auth_home_t,s0)
/root/\.google_authenticator gen_context(system_u:object_r:auth_home_t,s0)
/root/\.google_authenticator~ gen_context(system_u:object_r:auth_home_t,s0)

Expand Down
2 changes: 2 additions & 0 deletions policy/modules/system/authlogin.if
Original file line number Diff line number Diff line change
Expand Up @@ -2313,6 +2313,7 @@ interface(`auth_filetrans_admin_home_content',`
userdom_admin_home_dir_filetrans($1, auth_home_t, file, ".google_authenticator")
userdom_admin_home_dir_filetrans($1, auth_home_t, file, ".google_authenticator~")
userdom_admin_home_dir_filetrans($1, auth_home_t, dir, ".yubico")
userdom_admin_home_dir_filetrans($1, auth_home_t, dir, ".config/Yubico")
')


Expand Down Expand Up @@ -2377,6 +2378,7 @@ interface(`auth_filetrans_home_content',`
userdom_user_home_dir_filetrans($1, auth_home_t, file, ".google_authenticator")
userdom_user_home_dir_filetrans($1, auth_home_t, file, ".google_authenticator~")
userdom_user_home_dir_filetrans($1, auth_home_t, dir, ".yubico")
userdom_user_home_dir_filetrans($1, auth_home_t, dir, ".config/Yubico")
')

########################################
Expand Down

0 comments on commit 71e1989

Please sign in to comment.