| 函数逻辑报告 | 
| Source Code: security\selinux\hooks.c | Create Date:2022-07-27 20:27:24 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:inode_doinit_use_xattr
函数原型:static int inode_doinit_use_xattr(struct inode *inode, struct dentry *dentry, unsigned int def_sid, unsigned int *sid)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct inode * | inode | |
| struct dentry * | dentry | |
| unsigned int | def_sid | |
| unsigned int * | sid | 
| 1377 | len等于INITCONTEXTLEN | 
| 1383 | rc等于__vfs_getxattr(dentry, inode, XATTR_NAME_SELINUX, context, len) | 
| 1385 | 释放内存 | 
| 1388 | rc等于__vfs_getxattr(dentry, inode, XATTR_NAME_SELINUX, NULL, 0) | 
| 1398 | rc等于__vfs_getxattr(dentry, inode, XATTR_NAME_SELINUX, context, len) | 
| 1401 | 如果rc小于0则 | 
| 1402 | 释放内存 | 
| 1404 | 打印警告信息("SELinux: %s: getxattr returned %d for dev=%s ino=%ld\n", __func__, - rc, s_id, Stat data, not accessed from path walking ) | 
| 1406 | 返回:rc | 
| 1409 | 返回:0 | 
| 1412 | rc等于security_context_to_sid_default( & selinux_state, context, rc, sid, def_sid, GFP_NOFS) | 
| 1414 | 如果rc则 | 
| 1419 | pr_notice_ratelimited("SELinux: inode=%lu on dev=%s was found to have an invalid context=%s. This indicates you may need to relabel the inode or the filesystem in question.\n", ino, dev, context) | 
| 1421 | 否则 | 
| 1426 | 释放内存 | 
| 1427 | 返回:0 | 
| 名称 | 描述 | 
|---|---|
| inode_doinit_with_dentry | 
| 源代码转换工具 开放的插件接口 | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |