函数逻辑报告 | 
Source Code:security\commoncap.c | 
Create Date:2022-07-27 20:10:14 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称: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.
函数原型:int cap_convert_nscap(struct dentry *dentry, void **ivalue, size_t size)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct dentry * | dentry | |
| void ** | ivalue | |
| size_t | size | 
| 483 | task_ns等于current_user_ns(), fs_ns等于s_user_ns | 
| 490 | 如果非validheader(size, cap)则返回:负EINVAL | 
| 494 | 如果size恒等于XATTR_CAPS_SZ_2则如果ns_capable(s_user_ns, CAP_SETFCAP)则 | 
| 497 | 返回:size | 
| 499 | rootid等于rootid_from_xattr( * ivalue, size, task_ns) | 
| 507 | newsize等于sizeof(structvfs_ns_cap_data) | 
| 511 | rootid等于cpu_to_le32(nsrootid) | 
| 513 | magic等于le32_to_cpu( Little endian ) | 
| 516 | magic_etc等于cpu_to_le32(nsmagic) | 
| 521 | 返回:newsize | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |