Skip to content

setpriv: add new securebits#4461

Open
Skyb0rg007 wants to merge 1 commit into
util-linux:masterfrom
Skyb0rg007:new-securebits
Open

setpriv: add new securebits#4461
Skyb0rg007 wants to merge 1 commit into
util-linux:masterfrom
Skyb0rg007:new-securebits

Conversation

@Skyb0rg007

Copy link
Copy Markdown

The --securebits option in setpriv hasn't been updated since the 2013, when the command was introduced.
This PR adds the securebits which have been added in the meantime:

Modifies setpriv to support the securebits no_cap_ambient_raise, exec_restrict_file, exec_deny_interactive, and each of their _locked variants.

The NO_CAP_AMBIENT_RAISE securebit was added in Linux 4.3, and the EXEC_RESTRICT_FILE and EXEC_DENY_INTERACTIVE securebits were added in Linux 6.14.

@Skyb0rg007

Skyb0rg007 commented Jul 1, 2026

Copy link
Copy Markdown
Author

I'm not sure what the minimum supported kernel version is, but if its less than 4.3 I can add #ifndefs for the SECBIT_NO_CAP_AMBIENT_RAISE macro too.

Edit: PR_SET_NO_NEW_PRIVS is older than NO_CAP_AMBIENT_RAISE and it has an #ifndef, so I just added it.

Modifies setpriv to support the securebits `no_cap_ambient_raise`,
`exec_restrict_file`, `exec_deny_interactive`, and each of their
`_locked` variants.

The NO_CAP_AMBIENT_RAISE securebit was added in Linux 4.3, and the
EXEC_RESTRICT_FILE and EXEC_DENY_INTERACTIVE securebits were added in
Linux 6.14.

Signed-off-by: Skye Soss <skye@soss.website>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant