Function report |
Source Code:security\commoncap.c |
Create Date:2022-07-28 18:36:21 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:User requested a write of security.capability. If needed, update the* xattr to change from v2 to v3, or to fixup the v3 rootid.* If all is ok, we return the new size, on error return < 0.
Proto:int cap_convert_nscap(struct dentry *dentry, void **ivalue, size_t size)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct dentry * | dentry | |
void ** | ivalue | |
size_t | size |
483 | task_ns = current_user_ns() , fs_ns = s_user_ns |
490 | If Not validheader(size, cap) Then Return -EINVAL |
494 | If size == XATTR_CAPS_SZ_2 Then If ns_capable(s_user_ns, CAP_SETFCAP) Then |
497 | Return size |
499 | rootid = rootid_from_xattr( * ivalue, size, task_ns) |
507 | newsize = sizeof(structvfs_ns_cap_data) |
508 | nscap = Allocation memory |
511 | rootid = cpu_to_le32(nsrootid) |
512 | nsmagic = VFS_CAP_REVISION_3 |
513 | magic = le32_to_cpu( Little endian ) |
514 | If magic & VFS_CAP_FLAGS_EFFECTIVE Then nsmagic |= VFS_CAP_FLAGS_EFFECTIVE |
516 | magic_etc = cpu_to_le32(nsmagic) |
521 | Return newsize |
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 |