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_DUMPABLEandPR_SET_DUMPABLEbecause coredump is not supported
Unsupported operations:
PR_CAP_AMBIENT,PR_CAPBSET_READandPR_CAPBSET_DROPPR_GET_ENDIANandPR_SET_ENDIANPR_GET_FP_MODEandPR_SET_FP_MODEPR_GET_FPEMUandPR_SET_FPEMUPR_GET_FPEXCandPR_SET_FPEXCPR_GET_IO_FLUSHERandPR_SET_IO_FLUSHERPR_MCE_KILLandPR_MCE_KILL_GETPR_SET_MMandPR_SET_VMAPR_MPX_ENABLE_MANAGEMENTandPR_MPX_DISABLE_MANAGEMENTPR_GET_NO_NEW_PRIVSandPR_SET_NO_NEW_PRIVSPR_PAC_RESET_KEYSPR_SET_PTRACERPR_GET_SECCOMPandPR_SET_SECCOMPPR_GET_SPECULATION_CTRLandPR_SET_SPECULATION_CTRLPR_SVE_GET_VLandPR_SVE_SET_VLPR_SET_SYSCALL_USER_DISPATCHPR_GET_TAGGED_ADDR_CTRLandPR_SET_TAGGED_ADDR_CTRLPR_TASK_PERF_EVENTS_ENABLEandPR_TASK_PERF_EVENTS_DISABLEPR_GET_THP_DISABLEandPR_SET_THP_DISABLEPR_GET_TID_ADDRESSPR_GET_TIMERSLACKandPR_SET_TIMERSLACKPR_GET_TIMINGandPR_SET_TIMINGPR_GET_TSCandPR_SET_TSCPR_GET_UNALIGNandPR_SET_UNALIGNPR_GET_AUXVPR_GET_MDWEandPR_SET_MDWEPR_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.