Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\commoncap.c Create Date:2022-07-28 18:36:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:handle_privileged_root - Handle case of privileged root*@bprm: The execution parameters, including the proposed creds*@has_fcap: Are any file capabilities set?*@effective: Do we have effective root privilege?*@root_uid: This namespace' root UID WRT

Proto:static void handle_privileged_root(struct linux_binprm *bprm, bool has_fcap, bool *effective, kuid_t root_uid)

Type:void

Parameter:

TypeParameterName
struct linux_binprm *bprm
boolhas_fcap
bool *effective
kuid_troot_uid
716  old = current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.()
717  new = w credentials
719  If Not root_privileged() Then Return
726  If has_fcap && __is_suid(root_uid, new) Then
727  If a non-root user executes a setuid-root binary in* !secure(SECURE_NOROOT) mode, then we raise capabilities
728  Return
735  If __is_eff(root_uid, new) || __is_real(root_uid, new) Then
737  caps we're permitted = cap_combine( capability bounding set , caps our children can inherit )
743  If __is_eff(root_uid, new) Then * effective = true
Caller
NameDescribe
cap_bprm_set_credsap_bprm_set_creds - Set up the proposed credentials for execve().*@bprm: The execution parameters, including the proposed creds* Set up the proposed credentials for a new execution context being* constructed by execve()