函数逻辑报告 |
Source Code:security\tomoyo\condition.c |
Create Date:2022-07-27 21:07:03 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:moyo_scan_bprm - Scan "struct linux_binprm".*@ee: Pointer to "struct tomoyo_execve".*@argc: Length of @argc.*@argv: Pointer to "struct tomoyo_argv".*@envc: Length of @envp.*@envp: Poiner to "struct tomoyo_envp".* Returns true on success, false otherwise.
函数原型:static bool tomoyo_scan_bprm(struct tomoyo_execve *ee, const u16 argc, const struct tomoyo_argv *argv, const u16 envc, const struct tomoyo_envp *envp)
返回类型:bool
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct tomoyo_execve * | ee | |
| const u16 | argc | |
| const struct tomoyo_argv * | argv | |
| const u16 | envc | |
| const struct tomoyo_envp * | envp |
| 112 | arg_len等于0 |
| 113 | pos等于current top of mem |
| 115 | argv_count等于argc |
| 116 | envp_count等于envc |
| 117 | bool result = true |
| 121 | 如果argc加envc小于等于local_checked的长度则 |
| 122 | checked等于local_checked |
| 123 | memset(local_checked, 0, local_checked的长度) |
| 124 | 否则 |
| 129 | 当argv_count或envp_count循环 |
| 130 | 如果非tomoyo_dump_page(bprm, pos, dump)则 |
| 140 | 如果c且arg_len小于TOMOYO_EXEC_TMPSIZE减10则 |
| 141 | 如果c恒等于'\\'则 |
| 146 | 否则 |
| 153 | 否则 |
| 156 | 如果c则继续下一循环 |
| 159 | 如果argv_count则 |
| 166 | argv_count自减 |
| 167 | 否则如果envp_count则 |
| 168 | cp等于strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for |
| 170 | 如果cp则 |
| 171 | cp等于'\0' |
| 179 | envp_count自减 |
| 180 | 否则 |
| 181 | 退出 |
| 183 | arg_len等于0 |
| 185 | offset等于0 |
| 189 | out : |
| 190 | 如果result则 |
| 220 | 如果checked不等于local_checked则释放内存 |
| 222 | 返回:result |
| 名称 | 描述 |
|---|---|
| tomoyo_condition | moyo_condition - Check condition part.*@r: Pointer to "struct tomoyo_request_info".*@cond: Pointer to "struct tomoyo_condition". Maybe NULL.* Returns true on success, false otherwise.* Caller holds tomoyo_read_lock(). |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |