| Function report | 
| Source Code: kernel\auditfilter.c | Create Date:2022-07-28 11:24:51 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Translate struct audit_rule_data to kernel's rule representation.
Proto:static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, size_t datasz)
Type:struct audit_entry
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct audit_rule_data * | data | |
| size_t | datasz | 
| 444 | err = 0 | 
| 447 | remain = datasz - sizeof(structaudit_rule_data) | 
| 453 | If IS_ERR(entry) Then Go to exit_nofree | 
| 456 | bufp = string fields buffer | 
| 457 | When i < field_count cycle | 
| 463 | op = audit_to_op(fieldflags[i]) | 
| 471 | If type == AUDIT_LOGINUID && f_val == AUDIT_UID_UNSET Then | 
| 472 | type = AUDIT_LOGINUID_SET | 
| 473 | f_val = 0 | 
| 483 | Case type == AUDIT_LOGINUID | 
| 485 | Case type == AUDIT_EUID | 
| 486 | Case type == AUDIT_SUID | 
| 487 | Case type == AUDIT_FSUID | 
| 488 | Case type == AUDIT_OBJ_UID | 
| 492 | Break | 
| 494 | Case type == AUDIT_EGID | 
| 495 | Case type == AUDIT_SGID | 
| 496 | Case type == AUDIT_FSGID | 
| 497 | Case type == AUDIT_OBJ_GID | 
| 501 | Break | 
| 502 | Case type == AUDIT_ARCH | 
| 506 | Case type == security label user | 
| 507 | Case type == security label role | 
| 508 | Case type == security label type | 
| 509 | Case type == security label sensitivity label | 
| 510 | Case type == security label clearance label | 
| 511 | Case type == AUDIT_OBJ_USER | 
| 512 | Case type == AUDIT_OBJ_ROLE | 
| 513 | Case type == AUDIT_OBJ_TYPE | 
| 514 | Case type == AUDIT_OBJ_LEV_LOW | 
| 515 | Case type == AUDIT_OBJ_LEV_HIGH | 
| 533 | Break | 
| 534 | Case type == AUDIT_WATCH | 
| 541 | If err Then | 
| 546 | Break | 
| 553 | err = audit_make_tree( & rule, str, op) | 
| 558 | Break | 
| 559 | Case type == AUDIT_INODE | 
| 564 | Break | 
| 565 | Case type == AUDIT_FILTERKEY | 
| 566 | If ties events to rules || f_val > AUDIT_MAX_KEY_LEN Then Go to exit_free | 
| 574 | ties events to rules = str | 
| 575 | Break | 
| 577 | If exe || f_val > # chars in a path name including nul Then Go to exit_free | 
| 584 | audit_mark = audit_alloc_mark( & rule, str, f_val) | 
| 585 | If IS_ERR(audit_mark) Then | 
| 591 | exe = audit_mark | 
| 592 | Break | 
| 593 | Default | 
| 599 | If quick access to an inode field && op == Audit_not_equal Then quick access to an inode field = NULL | 
| 602 | exit_nofree : | 
| 603 | Return entry | 
| 605 | exit_free : | 
| 606 | If associated watched tree Then audit_put_tree( associated watched tree ) | 
| 608 | If exe Then | 
| 610 | audit_free_rule(entry) | 
| Name | Describe | 
|---|---|
| audit_rule_change | audit_rule_change - apply all rules to the specified message type*@type: audit message type*@seq: netlink audit message sequence (serial) number*@data: payload data*@datasz: size of payload data | 
| 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 |