Add "/usr/(.*/)?bin(/.*)?" pattern back
PATCH 1/1 Add "/usr/(.*/)?bin(/.*)?" pattern back
Commit 2e7553db639b ("Create / to /usr equivalence for bin, sbin, and lib, from Russell Coker.") removed from corecommands.fc:
/usr/(.*/)?bin(/.*)? gen_context(system_u:object_r:bin_t,s0)
Consequently files like /usr/x86_64-w64-mingw32/bin/objdump get labeled as usr_t:
$ matchpathcon /usr/x86_64-w64-mingw32/bin/objdump
/usr/x86_64-w64-mingw32/bin/objdump system_u:object_r:usr_tMake such files labeled as bin_t again.
--- policy/modules/kernel/corecommands.fc | 1 + 1 file changed, 1 insertion(+)
policy/modules/kernel/corecommands.fc +1 -0
@@ -135,6 +135,7 @@ ifdef(`distro_gentoo',` # /usr # /usr/(.*/)?Bin(/.*)? gen_context(system_u:object_r:bin_t,s0) +/usr/(.*/)?bin(/.*)? gen_context(system_u:object_r:bin_t,s0) /usr/bin(/.*)? gen_context(system_u:object_r:bin_t,s0) /usr/bin/d?ash -- gen_context(system_u:object_r:shell_exec_t,s0) /usr/bin/bash -- gen_context(system_u:object_r:shell_exec_t,s0)
Signature · 1 line
2.14.1
PATCH 1/1 Add "/usr/(.*/)?bin(/.*)?" pattern back
Quoted 21 lines · Nicolas Iooss via refpolicy
Commit
2e7553db639b("Create / to /usr equivalence for bin, sbin, and lib, from Russell Coker.") removed from corecommands.fc:/usr/(.*/)?bin(/.*)? gen_context(system_u:object_r:bin_t,s0)Consequently files like
/usr/x86_64-w64-mingw32/bin/objdumpget labeled asusr_t:$ matchpathcon /usr/x86_64-w64-mingw32/bin/objdump /usr/x86_64-w64-mingw32/bin/objdump system_u:object_r:usr_tMake such files labeled as
bin_tagain.--- policy/modules/kernel/corecommands.fc | 1 + 1 file changed, 1 insertion(+)policy/modules/kernel/corecommands.fc +0
-0
policy/modules/kernel/corecommands.fc ifdef(`distro_gentoo',` · line 141
Quoted 7 lines
policy/modules/kernel/corecommands.fc +1
-0@@ -135,6 +135,7 @@ ifdef(`distro_gentoo',` # /usr # /usr/(.*/)?Bin(/.*)? gen_context(system_u:object_r:bin_t,s0) +/usr/(.*/)?bin(/.*)? gen_context(system_u:object_r:bin_t,s0) /usr/bin(/.*)? gen_context(system_u:object_r:bin_t,s0) /usr/bin/d?ash -- gen_context(system_u:object_r:shell_exec_t,s0) /usr/bin/bash -- gen_context(system_u:object_r:shell_exec_t,s0)
Merged.
Signature · 1 line
Chris PeBenito