函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ap_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

函数原型:int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags)

返回类型:int

参数:

类型参数名称
struct cred *new
const struct cred *old
intflags
1037  :flags恒等于setreuid or setregid, id0 == real, id1 == eff
1038  :flags恒等于setuid or setgid, id0 == uid or gid
1039  :flags恒等于setresuid or setresgid, id0 == real, id1 == eff, uid2 == saved
1042  如果非issecure(When set, setuid to/from uid 0 does not trigger capability-"fixup".When unset, to provide compatiblility with old programs relying onset*uid to gain/lose privilege, transitions to/from uid 0 causecapabilities to be gained/lost. )则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
1044  退出
1046  :flags恒等于setfsuid or setfsgid, id0 == fsuid or fsgid
1064  退出
1066  默认
1067  返回:负EINVAL
1070  返回:0