Namespaces, Cgroups & Security
prctl
Supported functionality in SCML:
// Retrieve or set the parent-death signal
prctl(op = PR_GET_PDEATHSIG | PR_SET_PDEATHSIG, sig);
// Get or set the name of calling thread
prctl(op = PR_GET_NAME | PR_SET_NAME, name);
// Query whether process retains permitted capabilities after `UID` changes
prctl(op = PR_GET_KEEPCAPS);
// Configure permitted capabilities retention after `UID` changes
prctl(op = PR_SET_KEEPCAPS, state);
// Retrieve or set "child subreaper" attribute
prctl(op = PR_GET_CHILD_SUBREAPER | PR_SET_CHILD_SUBREAPER, isset);
Partially-supported operations:
PR_GET_DUMPABLE
andPR_SET_DUMPABLE
because coredump is not supported
Unsupported operations:
PR_CAP_AMBIENT
,PR_CAPBSET_READ
andPR_CAPBSET_DROP
PR_GET_ENDIAN
andPR_SET_ENDIAN
PR_GET_FP_MODE
andPR_SET_FP_MODE
PR_GET_FPEMU
andPR_SET_FPEMU
PR_GET_FPEXC
andPR_SET_FPEXC
PR_GET_IO_FLUSHER
andPR_SET_IO_FLUSHER
PR_MCE_KILL
andPR_MCE_KILL_GET
PR_SET_MM
andPR_SET_VMA
PR_MPX_ENABLE_MANAGEMENT
andPR_MPX_DISABLE_MANAGEMENT
PR_GET_NO_NEW_PRIVS
andPR_SET_NO_NEW_PRIVS
PR_PAC_RESET_KEYS
PR_SET_PTRACER
PR_GET_SECCOMP
andPR_SET_SECCOMP
PR_GET_SECUREBITS
andPR_SET_SECUREBITS
PR_GET_SPECULATION_CTRL
andPR_SET_SPECULATION_CTRL
PR_SVE_GET_VL
andPR_SVE_SET_VL
PR_SET_SYSCALL_USER_DISPATCH
PR_GET_TAGGED_ADDR_CTRL
andPR_SET_TAGGED_ADDR_CTRL
PR_TASK_PERF_EVENTS_ENABLE
andPR_TASK_PERF_EVENTS_DISABLE
PR_GET_THP_DISABLE
andPR_SET_THP_DISABLE
PR_GET_TID_ADDRESS
PR_GET_TIMERSLACK
andPR_SET_TIMERSLACK
PR_GET_TIMING
andPR_SET_TIMING
PR_GET_TSC
andPR_SET_TSC
PR_GET_UNALIGN
andPR_SET_UNALIGN
PR_GET_AUXV
PR_GET_MDWE
andPR_SET_MDWE
PR_RISCV_SET_ICACHE_FLUSH_CTX
For more information, see the man page.
capget
and capset
Supported functionality in SCML:
// Get capabilities of thread
capget(
hdrp = {
version = _LINUX_CAPABILITY_VERSION_3,
..
},
datap
);
// Set capabilities of thread
capset(
hdrp = {
version = _LINUX_CAPABILITY_VERSION_3,
..
},
datap
);
Unsupported versions:
_LINUX_CAPABILITY_VERSION_1
_LINUX_CAPABILITY_VERSION_2
For more information, see the man page.