syd-sec(1)

syd-sec1

Print secure bits or run command with secure bits set

Usage

syd-sec [-ahikprsxAIKPRSX] command [args ...]

Overview

Given no arguments, print information on process secure bits in compact JSON.

Given no command, one or more of the secure bit options [-aikprsx] may be given to test for secure bits. Use capital letter options, [-AIKPRSX], to test for locked versions of respective secure bits.

Given a command and arguments, with at least one of the secure bit options [-aikprsxAIKRSX] set the specified securebits, execute the command and exit with the same status.

Options

-hDisplay help and exit.
-p, -PSet/test process no_new_privs attribute.
-r, -RSet/test secure bit SECBIT_NOROOT.
-s, -SSet/test secure bit SECBIT_NO_SETUID_FIXUP.
-k, -KSet/test secure bit SECBIT_KEEP_CAPS.
-a, -ASet/test secure bit SECBIT_NO_CAP_AMBIENT_RAISE.
-x, -XSet/test secure bit SECBIT_EXEC_RESTRICT_FILE.
-i, -ISet/test secure bit SECBIT_EXEC_DENY_INTERACTIVE.

Secure bits

SecurebitDescriptionCAP_SETPCAP required?
NO_NEW_PRIVSWhen set, execve(2) will not grant new privileges (e.g., set-user-ID/set-group-ID mode bits and file capabilities are ignored). Inherited across fork(2), clone(2), and execve(2); once set, cannot be unset.No
NOROOTDisable special handling of UID 0 for gaining capabilities on exec/setuid. NOROOT_LOCKED is lock for NOROOT (prevents further changes; irreversible).Yes
NO_SETUID_FIXUPStop kernel adjustments to permitted/effective/ambient capability sets when effective/filesystem UIDs toggle between 0 and nonzero. NO_SETUID_FIXUP_LOCKED is lock for NO_SETUID_FIXUP (prevents further changes; irreversible).Yes
KEEP_CAPSAllow retaining permitted capabilities when switching all UIDs from 0 to nonzero; always cleared on execve(2). KEEP_CAPS_LOCKED is lock for KEEP_CAPS (prevents further changes; irreversible).Yes
NO_CAP_AMBIENT_RAISEDisallow raising ambient capabilities via prctl(PR_CAP_AMBIENT_RAISE). NO_CAP_AMBIENT_RAISE_LOCKED is lock for NO_CAP_AMBIENT_RAISE (prevents further changes; irreversible).Yes
EXEC_RESTRICT_FILEInterpreter/dynamic linker should execute a file only if execveat(2) with AT_EXECVE_CHECK on the related file descriptor succeeds. EXEC_RESTRICT_FILE_LOCKED is lock for EXEC_RESTRICT_FILE (prevents further changes; irreversible).No
EXEC_DENY_INTERACTIVEInterpreter should not accept interactive user commands; content via a file descriptor is allowed only if execveat(2) with AT_EXECVE_CHECK succeeds. EXEC_DENY_INTERACTIVE_LOCKED is lock for EXEC_DENY_INTERACTIVE (prevents further changes; irreversible).No

Exit status

When querying secure bits, syd-sec exits with success if all the specified secure bits are set in process secure bits. When running a command, syd-sec exits with the same code as the child process. If PR_SET_SECUREBITS(2const) prctl(2) operation fails prior to command execution, syd-sec exits with errno(3).

Authors

Maintained by Ali Polatel. Up-to-date sources can be found at https://gitlab.exherbo.org/sydbox/sydbox.git and on Radicle at rad:z38HCnbmcDegA2BMxuPaPRPMdp6wF. Bugs/patches can be submitted to https://gitlab.exherbo.org/groups/sydbox/-/issues. Discuss in #sydbox on Libera Chat or in #sydbox:mailstation.de on Matrix.

From syd 3.59.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.