函数逻辑报告 |
Source Code:security\tomoyo\condition.c |
Create Date:2022-07-27 21:07:40 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:moyo_get_condition - Parse condition part.*@param: Pointer to "struct tomoyo_acl_param".* Returns pointer to "struct tomoyo_condition" on success, NULL otherwise.
函数原型:struct tomoyo_condition *tomoyo_get_condition(struct tomoyo_acl_param *param)
返回类型:struct tomoyo_condition
参数:
类型 | 参数 | 名称 |
---|---|---|
struct tomoyo_acl_param * | param |
497 | struct tomoyo_condition * entry = NULL |
498 | struct tomoyo_condition_element * condp = NULL |
499 | struct tomoyo_number_union * numbers_p = NULL |
500 | struct tomoyo_name_union * names_p = NULL |
501 | struct tomoyo_argv * argv = NULL |
502 | struct tomoyo_envp * envp = NULL |
503 | struct tomoyo_condition e = {} |
509 | rerun : |
510 | pos等于start_of_string |
511 | 当1循环 |
512 | left等于负1 |
513 | right等于负1 |
531 | 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 |
532 | 如果cp则 |
535 | 否则 |
536 | pos等于"" |
538 | right_word等于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 |
539 | 如果非right_word或right_word恒等于left_word则转到:out |
541 | is_not等于*right_word减1的差恒等于'!' |
542 | 如果is_not则 * (right_word++ - 1) = '\0' |
544 | 否则如果*right_word加1的和不等于'='则right_word自加等于'\0' |
546 | 否则转到:out |
548 | Define this to enable debug mode. (warning conditions "%u: <%s>%s=<%s>\n", __LINE__, left_word, is_not ? "!" : "", right_word) |
550 | 如果非字符串比较则 |
564 | 如果非字符串指定长度比较则 |
579 | 如果非字符串指定长度比较则 |
594 | left等于moyo_condition_type - Get condition type.*@word: Keyword string.* Returns one of values in "enum tomoyo_conditions_index" on success,* TOMOYO_MAX_CONDITION_KEYWORD otherwise. |
595 | Define this to enable debug mode. (warning conditions "%u: <%s> left=%u\n", __LINE__, left_word, left) |
597 | 如果left恒等于TOMOYO_MAX_CONDITION_KEYWORD则 |
598 | 如果非numbers_p则 |
600 | 否则 |
602 | left等于TOMOYO_NUMBER_UNION |
604 | 如果left_word恒等于'@'或非tomoyo_parse_number_union(param, numbers_p++)则转到:out |
610 | 如果非condp则Number of conditions in this struct. 自加 |
612 | 否则Number of conditions in this struct. 自减 |
614 | 如果left恒等于TOMOYO_EXEC_REALPATH或left恒等于TOMOYO_SYMLINK_TARGET则 |
628 | right等于moyo_condition_type - Get condition type.*@word: Keyword string.* Returns one of values in "enum tomoyo_conditions_index" on success,* TOMOYO_MAX_CONDITION_KEYWORD otherwise. |
629 | 如果right恒等于TOMOYO_MAX_CONDITION_KEYWORD则 |
630 | 如果非numbers_p则 |
632 | 否则 |
634 | right等于TOMOYO_NUMBER_UNION |
635 | data等于right_word |
636 | 如果非tomoyo_parse_number_union(param, numbers_p++)则转到:out |
641 | store_value : |
642 | 如果非condp则 |
643 | Define this to enable debug mode. (warning conditions "%u: dry_run left=%u right=%u match=%u\n", __LINE__, left, right, !is_not) |
645 | 继续下一循环 |
647 | Left hand operand. A "struct tomoyo_argv" for TOMOYO_ARGV_ENTRY, a* "struct tomoyo_envp" for TOMOYO_ENVP_ENTRY is attached to the tail* of the array of this struct.等于left |
648 | Right hand operand. A "struct tomoyo_number_union" for* TOMOYO_NUMBER_UNION, a "struct tomoyo_name_union" for* TOMOYO_NAME_UNION is attached to the tail of the array of this* struct.等于right |
653 | condp自加 |
655 | Define this to enable debug mode. (formational "%u: cond=%u numbers=%u names=%u ac=%u ec=%u\n", __LINE__, Number of conditions in this struct. , Number of "struct tomoyo_number_union values". , Number of "struct tomoyo_name_union names". , Number of "struct tomoyo_argv". , Number of "struct tomoyo_envp". ) |
658 | 如果entry则 |
673 | Maybe NULL. = NULL |
680 | bool flag = false |
682 | 以pos小于end_of_string循环 |
694 | 转到:rerun |
695 | out : |
696 | Define this to enable debug mode. (warning conditions "%u: %s failed\n", __LINE__, __func__) |
697 | 如果entry则 |
699 | 释放内存 |
701 | out2 : |
703 | 返回:NULL |
名称 | 描述 |
---|---|
tomoyo_update_domain | moyo_update_domain - Update an entry for domain policy.*@new_entry: Pointer to "struct tomoyo_acl_info".*@size: Size of @new_entry in bytes.*@param: Pointer to "struct tomoyo_acl_param".*@check_duplicate: Callback function to find duplicated entry. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |