函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\ima\ima_policy.c Create Date:2022-07-27 22:04:27
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:ma_parse_add_rule - add a rule to ima_policy_rules*@rule - ima measurement policy rule* Avoid locking by allowing just one writer at a time in ima_write_policy()* Returns the length of the rule parsed, an error code on failure

函数原型:ssize_t ima_parse_add_rule(char *rule)

返回类型:ssize_t

参数:

类型参数名称
char *rule
1259  op[]等于"update_policy"
1263  audit_info等于0
1265  p等于分割字符串
1266  len等于strlen - Find the length of a string*@s: The string to be sized加1
1267  p加等于strspn - Calculate the length of the initial substring of @s which only contain letters in @accept*@s: The string to be searched*@accept: The string to search for
1269  如果p恒等于'#'或p恒等于'\0'则返回:len
1272  entry等于分配内存并置零
1273  如果非entry
1274  integrity_audit_msg(Integrity enable status , NULL, NULL, op, "-ENOMEM", - ENOMEM, audit_info)
1276  返回:负ENOMEM
1279  初始化链表头
1281  result等于ima_parse_rule(p, entry)
1282  如果result
1283  释放内存
1284  integrity_audit_msg(Integrity enable status , NULL, NULL, op, "invalid-policy", result, audit_info)
1287  返回:result
1290  添加链表项
1292  返回:len
调用者
名称描述
ima_write_policy
ima_read_policy