函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\commoncap.c Create Date:2022-07-27 20:10:49
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:ap_emulate_setxuid() fixes the effective / permitted capabilities of* a process after a call to setuid, setreuid, or setresuid.* 1) When set*uiding _from_ one of {r,e,s}uid == 0 _to_ all of* {r,e,s}uid != 0, the permitted and effective capabilities are

函数原型:static inline void cap_emulate_setxuid(struct cred *new, const struct cred *old)

返回类型:void

参数:

类型参数名称
struct cred *new
const struct cred *old
999  root_uid等于make_kuid - Map a user-namespace uid pair into a kuid
1001  如果uid_eq(进程uid, root_uid)或uid_eq(有效uid, root_uid)或uid_eq(保留uid, root_uid)的值且非uid_eq(进程uid, root_uid)且非uid_eq(有效uid, root_uid)且非uid_eq(保留uid, root_uid)则
1017  cap_clear( Ambient capability set )
1019  如果uid_eq(有效uid, root_uid)且非uid_eq(有效uid, root_uid)则cap_clear( caps we can actually use )
1021  如果非uid_eq(有效uid, root_uid)且uid_eq(有效uid, root_uid)则 caps we can actually use 等于 caps we're permitted
调用者
名称描述
cap_task_fix_setuidap_task_fix_setuid - Fix up the results of setuid() call*@new: The proposed credentials*@old: The current task's current credentials*@flags: Indications of what has changed* Fix up the results of setuid() call before the credential changes are