Function report |
Source Code:security\integrity\ima\ima_policy.c |
Create Date:2022-07-28 19:59:04 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:ssize_t ima_parse_add_rule(char *rule)
Type:ssize_t
Parameter:
Type | Parameter | Name |
---|---|---|
char * | rule |
1259 | op[] = "update_policy" |
1263 | audit_info = 0 |
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 |
1272 | entry = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
1273 | If Not entry Then |
1274 | integrity_audit_msg(Integrity enable status , NULL, NULL, op, "-ENOMEM", - ENOMEM, audit_info) |
1276 | Return -ENOMEM |
1281 | result = ima_parse_rule(p, entry) |
1282 | If result Then |
1284 | integrity_audit_msg(Integrity enable status , NULL, NULL, op, "invalid-policy", result, audit_info) |
1287 | Return result |
1292 | Return len |
Name | Describe |
---|---|
ima_write_policy | |
ima_read_policy |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |