函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Check whether a caller with old credentials @old is allowed to switch to* credentials that contain @new_uid.

函数原型:static bool uid_permitted_for_cred(const struct cred *old, kuid_t new_uid)

返回类型:bool

参数:

类型参数名称
const struct cred *old
kuid_tnew_uid
105  如果uid_eq(new_uid, 进程uid)或uid_eq(new_uid, 有效uid)或uid_eq(new_uid, 保留uid)则返回:true
113  permitted等于Compute a decision for a transition from @src to @dst under the active* policy.不等于 source ID is affected by policy
115  如果非permitted
116  打印警告信息("UID transition ((%d,%d,%d) -> %d) blocked\n", __kuid_val(进程uid), __kuid_val(有效uid), __kuid_val(保留uid), __kuid_val(new_uid))
120  返回:permitted
调用者
名称描述
safesetid_task_fix_setuidCheck whether there is either an exception for user under old cred struct to* set*uid to user under new cred struct, or the UID transition is allowed (by* Linux set*uid rules) even without CAP_SETUID.