Function report |
Source Code:security\commoncap.c |
Create Date:2022-07-28 18:36:32 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Extract the on-exec-apply capability sets for an executable file.
Proto:int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| 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 | If size == -ENODATA || size == -EOPNOTSUPP Then Return -ENODATA |
| 600 | magic_etc = magic_etc = le32_to_cpu( Little endian ) |
| 604 | Case & == VFS_CAP_REVISION_1 |
| 609 | Case & == VFS_CAP_REVISION_2 |
| 614 | Case & == VFS_CAP_REVISION_3 |
| 621 | Default |
| 622 | Return -EINVAL |
| 627 | If Not rootid_owns_currentns(rootkuid) Then Return -ENODATA |
| 633 | cap[i] = le32_to_cpu(permitted) |
| 634 | cap[i] = le32_to_cpu( Little endian ) |
| 637 | cap[CAP_LAST_U32] &= CAP_LAST_U32_VALID_MASK |
| 638 | cap[CAP_LAST_U32] &= CAP_LAST_U32_VALID_MASK |
| 642 | Return 0 |
| Name | Describe |
|---|---|
| __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 |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |