函数逻辑报告 | 
Source Code:security\selinux\hooks.c | 
Create Date:2022-07-27 20:26:30 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:Allow filesystems with binary mount data to explicitly set mount point* labeling information.
函数原型:static int selinux_set_mnt_opts(struct super_block *sb, void *mnt_opts, unsigned long kern_flags, unsigned long *set_kern_flags)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct super_block * | sb | |
| void * | mnt_opts | |
| unsigned long | kern_flags | |
| unsigned long * | set_kern_flags | 
| 651 | cred等于current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.() | 
| 652 | sbsec等于s_security | 
| 656 | fscontext_sid等于0, context_sid等于0, rootcontext_sid等于0 | 
| 657 | defcontext_sid等于0 | 
| 658 | rc等于0 | 
| 660 | mutex_lock( & lock) | 
| 662 | 如果非initialized则 | 
| 663 | 如果非opts则 | 
| 667 | 转到:out | 
| 670 | 打印警告信息("SELinux: Unable to set superblock options before the security server is initialized\n") | 
| 672 | 转到:out | 
| 674 | 如果kern_flags且非set_kern_flags则 | 
| 692 | 如果 which mount options were specified 按位与Non-mount related flags 且fs_flags按位与FS_BINARY_MOUNTDATA且非opts则转到:out | 
| 703 | 如果opts则 | 
| 704 | 如果fscontext则 | 
| 705 | rc等于parse_sid(sb, fscontext, & fscontext_sid) | 
| 713 | 如果context则 | 
| 714 | rc等于parse_sid(sb, context, & context_sid) | 
| 722 | 如果rootcontext则 | 
| 723 | rc等于parse_sid(sb, rootcontext, & rootcontext_sid) | 
| 731 | 如果defcontext则 | 
| 732 | rc等于parse_sid(sb, defcontext, & defcontext_sid) | 
| 744 | 如果 which mount options were specified 按位与Mask for just the mount related flags 且非opts则转到:out_double_mount | 
| 746 | rc等于0 | 
| 747 | 转到:out | 
| 750 | 如果字符串比较恒等于0则 which mount options were specified 或等于SE_SBPROC按位或SE_SBGENFS | 
| 753 | 如果非字符串比较或非字符串比较或非字符串比较则 which mount options were specified 或等于SE_SBGENFS | 
| 758 | 如果非字符串比较或非字符串比较或非字符串比较则 which mount options were specified 或等于SE_SBGENFS按位或SE_SBGENFS_XATTR | 
| 763 | 如果非 labeling behavior 则 | 
| 768 | rc等于security_fs_use( & selinux_state, sb) | 
| 769 | 如果rc则 | 
| 790 | 如果 labeling behavior 恒等于use xattr 则 | 
| 800 | 转到:out_set_opts | 
| 804 | 如果fscontext_sid则 | 
| 822 | 如果context_sid则 | 
| 842 | 如果rootcontext_sid则 | 
| 849 | initialization flag 等于 initialized | 
| 852 | 如果defcontext_sid则 | 
| 853 | 如果 labeling behavior 不等于use xattr 且 labeling behavior 不等于use native label support 则 | 
| 861 | 如果defcontext_sid不等于 default SID for labeling 则 | 
| 871 | out_set_opts : | 
| 872 | rc等于sb_finish_set_opts(sb) | 
| 873 | out : | 
| 875 | 返回:rc | 
| 876 | out_double_mount : | 
| 878 | 打印警告信息("SELinux: mount invalid. Same superblock, different security settings for (dev %s, type %s)\n", Informational name , name) | 
| 881 | 转到:out | 
| 名称 | 描述 | 
|---|---|
| delayed_superblock_init | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |