Skip to content

Commit

Permalink
Set default file context of HOME_DIR/tmp/.* to <<none>>
Browse files Browse the repository at this point in the history
Until now, there was only an entry for a HOME_DIR/tmp directory which
means the default context for file in this users' tmp directory is
the inherited user_home_t type which is not correct.

The commit addresses the following issue:
restorecon -Frnv /home/username/tmp
Would relabel /home/username/tmp/foo from unconfined_u:object_r:user_tmp_t:s0 to unconfined_u:object_r:user_home_t:s0

Resolves: https://issues.redhat.com/browse/RHEL-1099
  • Loading branch information
zpytela committed Oct 2, 2023
1 parent fa32b44 commit 1ef483d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions policy/modules/system/userdomain.fc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ HOME_DIR/\.texlive2013(/.*)? gen_context(system_u:object_r:texlive_home_t,s0)
HOME_DIR/\.texlive2014(/.*)? gen_context(system_u:object_r:texlive_home_t,s0)
HOME_DIR/\.tmp -d gen_context(system_u:object_r:user_tmp_t,s0)
HOME_DIR/tmp -d gen_context(system_u:object_r:user_tmp_t,s0)
HOME_DIR/tmp/.* <<none>>

/tmp/\.X0-lock -- gen_context(system_u:object_r:user_tmp_t,s0)
/tmp/\.X11-unix(/.*)? gen_context(system_u:object_r:user_tmp_t,s0)
Expand Down

0 comments on commit 1ef483d

Please sign in to comment.