Skip to content

Commit 91befd5

Browse files
committed
Introduce domain_no_new_privs boolean (bsc#1253047)
Allows all domains to do nnp_transition when executing another process. This is needed for tools that disallow setuid/setgid binaries e.g. https://github.com/thkukuk/account-utils and use NoNewPrivs to accomplish that default: off see also: https://docs.kernel.org/userspace-api/no_new_privs.html
1 parent fc06a69 commit 91befd5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

policy/modules/kernel/domain.te

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ policy_module(domain, 1.11.0)
1212
#
1313
gen_tunable(domain_fd_use, true)
1414

15+
## <desc>
16+
## <p>
17+
## Allow all domains to set NoNewPrivs
18+
## </p>
19+
## </desc>
20+
#
21+
gen_tunable(domain_no_new_privs, false)
22+
1523
## <desc>
1624
## <p>
1725
## Allow all domains to execute in fips_mode
@@ -209,6 +217,10 @@ tunable_policy(`domain_can_mmap_files',`
209217
allow domain file_type:lnk_file map;
210218
')
211219

220+
tunable_policy(`domain_no_new_privs',`
221+
allow domain self:process2 { nnp_transition nosuid_transition };
222+
')
223+
212224
ifdef(`hide_broken_symptoms',`
213225
# This check is in the general socket
214226
# listen code, before protocol-specific

0 commit comments

Comments
 (0)