函数逻辑报告 |
Source Code:security\commoncap.c |
Create Date:2022-07-27 20:10:25 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Extract the on-exec-apply capability sets for an executable file.
函数原型:int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| const struct dentry * | dentry | |
| struct cpu_vfs_cap_data * | cpu_caps |
| 577 | nscaps等于data |
| 578 | struct vfs_cap_data * caps = (struct vfs_cap_data * ) & data |
| 582 | memset(cpu_caps, 0, sizeof(structcpu_vfs_cap_data)) |
| 588 | size等于__vfs_getxattr((structdentry * )dentry, inode, XATTR_NAME_CAPS, & data, XATTR_CAPS_SZ) |
| 590 | 如果size恒等于负ENODATA或size恒等于负EOPNOTSUPP则返回:负ENODATA |
| 600 | magic_etc等于magic_etc等于le32_to_cpu( Little endian ) |
| 604 | 当: & == VFS_CAP_REVISION_1 |
| 609 | 当: & == VFS_CAP_REVISION_2 |
| 614 | 当: & == VFS_CAP_REVISION_3 |
| 621 | 默认 |
| 622 | 返回:负EINVAL |
| 627 | 如果非rootid_owns_currentns(rootkuid)则返回:负ENODATA |
| 633 | cap[i]等于le32_to_cpu(permitted) |
| 634 | cap[i]等于le32_to_cpu( Little endian ) |
| 642 | 返回:0 |
| 名称 | 描述 |
|---|---|
| __audit_log_bprm_fcaps | __audit_log_bprm_fcaps - store information about a loading bprm and relevant fcaps*@bprm: pointer to the bprm being processed*@new: the proposed new credentials*@old: the old credentials* Simply check if the proc already has the caps given by the file and |
| get_file_caps | Attempt 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(). |
| audit_copy_fcaps |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |