函数逻辑报告 |
Source Code:security\smack\smack_lsm.c |
Create Date:2022-07-27 20:50:27 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:smack_mmap_file :* Check permissions for a mmap operation. The @file may be NULL, e.g.* if mapping anonymous memory.*@file contains the file structure for file to map (may be NULL).*@reqprot contains the protection requested by the application.
函数原型:static int smack_mmap_file(struct file *file, unsigned long reqprot, unsigned long prot, unsigned long flags)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct file * | file | |
| unsigned long | reqprot | |
| unsigned long | prot | |
| unsigned long | flags |
| 1673 | 如果(file == NULL)则返回:0 |
| 1676 | 如果此条件成立可能性小(为编译器优化)(IS_PRIVATE(file_inode(file)))则返回:0 |
| 1679 | isp等于smack_inode(file_inode(file)) |
| 1680 | 如果(label of the mmap domain == NULL)则返回:0 |
| 1682 | sbsp等于s_security |
| 1683 | 如果smk_flags按位与SMK_SB_UNTRUSTED且label of the mmap domain 不等于smk_root则返回:负EACCES |
| 1686 | mkp等于label of the mmap domain |
| 1688 | tsp等于smack_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.()) |
| 1690 | rc等于0 |
| 1699 | okp等于smk_object |
| 1712 | 如果may恒等于负ENOENT则may等于smk_access |
| 1714 | 否则may与等于smk_access |
| 1720 | 如果may恒等于0则继续下一循环 |
| 1756 | 返回:rc |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |