函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Calculate the new process capability sets from the capability sets attached* to a file.

函数原型:static inline int bprm_caps_from_vfs_caps(struct cpu_vfs_cap_data *caps, struct linux_binprm *bprm, bool *effective, bool *has_fcap)

返回类型:int

参数:

类型参数名称
struct cpu_vfs_cap_data *caps
struct linux_binprm *bprm
bool *effective
bool *has_fcap
533  new等于w credentials
535  ret等于0
537  如果magic_etc按位与VFS_CAP_FLAGS_EFFECTIVE则 * effective = true
540  如果magic_etc按位与VFS_CAP_REVISION_MASK则 * has_fcap = true
544  permitted等于cap[i]
545  inheritable等于cap[i]
551  cap[i]等于cap[i]按位与permitted按位或cap[i]按位与inheritable
555  如果permitted按位与cap[i]的反则ret等于负EPERM
565  返回:如果effectiveret否则0
调用者
名称描述
get_file_capsAttempt to get the on-exec apply capability sets for an executable file from* its xattrs and, if present, apply them to the proposed credentials being* constructed by execve().