函数逻辑报告 |
Source Code:security\selinux\hooks.c |
Create Date:2022-07-27 20:27:33 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:inode_doinit_with_dentry
函数原型:static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dentry)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct inode * | inode | |
| struct dentry * | opt_dentry |
| 1433 | struct superblock_security_struct * sbsec = NULL |
| 1434 | isec等于selinux_inode(inode) |
| 1435 | sid等于0 |
| 1438 | rc等于0 |
| 1440 | 如果 initialization flag 恒等于 initialized 则返回:0 |
| 1443 | 加自旋锁 |
| 1444 | 如果 initialization flag 恒等于 initialized 则转到:out_unlock |
| 1447 | 如果 security class of this object 恒等于SECCLASS_FILE则 security class of this object 等于inode_mode_to_security_class(i_mode) |
| 1450 | sbsec等于s_security |
| 1451 | 如果非 which mount options were specified 按位与Non-mount related flags 的值则 |
| 1463 | task_sid等于 SID of creating task |
| 1464 | sid等于 SID of this object |
| 1465 | initialization flag 等于LABEL_PENDING |
| 1466 | 自旋锁解锁 |
| 1469 | 当: labeling behavior 恒等于use native label support |
| 1470 | 退出 |
| 1471 | 当: labeling behavior 恒等于use xattr |
| 1473 | sid等于 default SID for labeling |
| 1474 | 退出 |
| 1478 | 如果opt_dentry则 |
| 1481 | 否则 |
| 1488 | dentry等于获取索引节点在哈希表中的别名 |
| 1489 | 如果非dentry则dentry等于d_find_any_alias(inode) |
| 1492 | 如果非dentry则 |
| 1502 | 转到:out |
| 1505 | rc等于inode_doinit_use_xattr(inode, dentry, default SID for labeling , & sid) |
| 1510 | 退出 |
| 1516 | sid等于 SID of file system superblock |
| 1519 | rc等于security_transition_sid( & selinux_state, task_sid, sid, sclass, NULL, & sid) |
| 1523 | 退出 |
| 1524 | 当: labeling behavior 恒等于use mountpoint labeling |
| 1526 | 退出 |
| 1527 | 默认 |
| 1529 | sid等于 SID of file system superblock |
| 1531 | 如果 which mount options were specified 按位与SE_SBGENFS且非S_ISLNK(i_mode)则 |
| 1534 | 如果opt_dentry则 |
| 1538 | 否则 |
| 1543 | dentry等于获取索引节点在哈希表中的别名 |
| 1544 | 如果非dentry则dentry等于d_find_any_alias(inode) |
| 1558 | rc等于selinux_genfs_get_sid(dentry, sclass, which mount options were specified , & sid) |
| 1560 | 如果rc则 |
| 1565 | 如果 which mount options were specified 按位与SE_SBGENFS_XATTR且i_opflags按位与IOP_XATTR则 |
| 1576 | 退出 |
| 1579 | out : |
| 1580 | 加自旋锁 |
| 1581 | 如果 initialization flag 恒等于LABEL_PENDING则 |
| 1591 | out_unlock : |
| 1592 | 自旋锁解锁 |
| 1593 | 返回:rc |
| 名称 | 描述 |
|---|---|
| __inode_security_revalidate | Try reloading inode security labels that have been marked as invalid. The*@may_sleep parameter indicates when sleeping and thus reloading labels is* allowed; when set to false, returns -ECHILD when the label is* invalid |
| inode_doinit | |
| sb_finish_set_opts | |
| selinux_d_instantiate |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |