Skip to content

docs: setpriv: improve EXAMPLES section#4420

Merged
karelzak merged 1 commit into
util-linux:masterfrom
karelzak:PR/setpriv-examples
Jun 16, 2026
Merged

docs: setpriv: improve EXAMPLES section#4420
karelzak merged 1 commit into
util-linux:masterfrom
karelzak:PR/setpriv-examples

Conversation

@karelzak

Copy link
Copy Markdown
Collaborator

Summary

  • Clarify that setpriv is not a 1:1 replacement for su/runuser/sudo (no PAM, no password prompt, no session setup)
  • Add --inh-caps=-all to the basic runuser-like example
  • Add example with --reset-env for sudo-like behavior
  • Add restrictive example with --bounding-set=-all and --no-new-privs

Fixes: #4402

Clarify that setpriv is not a 1:1 replacement for su/runuser/sudo,
add --inh-caps=-all to the basic example, and provide additional
examples for environment reset and restrictive privilege dropping.

Fixes: util-linux#4402
Signed-off-by: Karel Zak <kzak@redhat.com>
@karelzak karelzak merged commit f567027 into util-linux:master Jun 16, 2026
34 of 35 checks passed
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.

setpriv utility: wrong (security affecting) recommendation?

1 participant