函数逻辑报告 |
Source Code:kernel\auditsc.c |
Create Date:2022-07-27 12:30:11 |
| Last Modify:2020-03-17 16:31:21 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Compare a task_struct with an audit_rule. Return 1 on match, 0* otherwise.* If task_creation is true, this is an explicit indication that we are* filtering a task rule at task creation time. This and tsk == current are
函数原型:static int audit_filter_rules(struct task_struct *tsk, struct audit_krule *rule, struct audit_context *ctx, struct audit_names *name, enum audit_state *state, bool task_creation)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct task_struct * | tsk | |
| struct audit_krule * | rule | |
| struct audit_context * | ctx | |
| struct audit_names * | name | |
| enum audit_state * | state | |
| bool | task_creation |
| 446 | need_sid等于1 |
| 452 | 以i小于field_count循环 |
| 455 | result等于0 |
| 463 | 当:type恒等于AUDIT_PPID |
| 464 | 如果ctx则 |
| 469 | 退出 |
| 478 | 当:type恒等于AUDIT_EUID |
| 481 | 当:type恒等于AUDIT_SUID |
| 484 | 当:type恒等于AUDIT_FSUID |
| 485 | result等于audit_uid_comparator( UID for VFS ops , op, uid) |
| 486 | 退出 |
| 488 | result等于audit_gid_comparator(进程gid, op, gid) |
| 489 | 如果op恒等于Audit_equal则 |
| 490 | 如果非result则result等于a simple bsearch |
| 492 | 否则如果op恒等于Audit_not_equal则 |
| 493 | 如果result则result等于非a simple bsearch |
| 496 | 退出 |
| 497 | 当:type恒等于AUDIT_EGID |
| 498 | result等于audit_gid_comparator(有效gid, op, gid) |
| 499 | 如果op恒等于Audit_equal则 |
| 500 | 如果非result则result等于a simple bsearch |
| 502 | 否则如果op恒等于Audit_not_equal则 |
| 503 | 如果result则result等于非a simple bsearch |
| 506 | 退出 |
| 507 | 当:type恒等于AUDIT_SGID |
| 510 | 当:type恒等于AUDIT_FSGID |
| 511 | result等于audit_gid_comparator( GID for VFS ops , op, gid) |
| 512 | 退出 |
| 513 | 当:type恒等于Session ID |
| 517 | 当:type恒等于AUDIT_PERS |
| 520 | 当:type恒等于AUDIT_ARCH |
| 525 | 当:type恒等于AUDIT_EXIT |
| 529 | 当:type恒等于xit >= 0; value ignored |
| 531 | 如果val则result等于audit_comparator(返回值, op, AUDITSC_SUCCESS) |
| 533 | 否则result等于audit_comparator(返回值, op, AUDITSC_FAILURE) |
| 536 | 退出 |
| 551 | 退出 |
| 552 | 当:type恒等于AUDIT_DEVMINOR |
| 566 | 退出 |
| 567 | 当:type恒等于AUDIT_INODE |
| 570 | 否则如果ctx则 |
| 578 | 退出 |
| 579 | 当:type恒等于AUDIT_OBJ_UID |
| 590 | 退出 |
| 591 | 当:type恒等于AUDIT_OBJ_GID |
| 602 | 退出 |
| 603 | 当:type恒等于AUDIT_WATCH |
| 604 | 如果name则 |
| 605 | result等于audit_watch_compare( associated watch , ino, dev) |
| 608 | 如果op恒等于Audit_not_equal则result等于非result |
| 611 | 退出 |
| 619 | 当:type恒等于AUDIT_LOGINUID |
| 620 | result等于audit_uid_comparator(audit_get_loginuid(tsk), op, uid) |
| 622 | 退出 |
| 623 | 当:type恒等于AUDIT_LOGINUID_SET |
| 624 | result等于audit_comparator(audit_loginuid_set(tsk), op, val) |
| 625 | 退出 |
| 626 | 当:type恒等于AUDIT_SADDR_FAM |
| 627 | 如果sockaddr则result等于audit_comparator(address family , op, val) |
| 630 | 退出 |
| 631 | 当:type恒等于security label user |
| 632 | 当:type恒等于security label role |
| 633 | 当:type恒等于security label type |
| 651 | 当:type恒等于AUDIT_OBJ_USER |
| 652 | 当:type恒等于AUDIT_OBJ_ROLE |
| 653 | 当:type恒等于AUDIT_OBJ_TYPE |
| 654 | 当:type恒等于AUDIT_OBJ_LEV_LOW |
| 655 | 当:type恒等于AUDIT_OBJ_LEV_HIGH |
| 686 | 退出 |
| 687 | 当:type恒等于AUDIT_ARG0 |
| 688 | 当:type恒等于AUDIT_ARG1 |
| 689 | 当:type恒等于AUDIT_ARG2 |
| 690 | 当:type恒等于AUDIT_ARG3 |
| 691 | 如果ctx则result等于audit_comparator(调用参数[type - AUDIT_ARG0], op, val) |
| 693 | 退出 |
| 694 | 当:type恒等于AUDIT_FILTERKEY |
| 698 | 当:type恒等于AUDIT_PERM |
| 703 | 当:type恒等于AUDIT_FILETYPE |
| 708 | 当:type恒等于AUDIT_FIELD_COMPARE |
| 712 | 如果非result则返回:0 |
| 716 | 如果ctx则 |
| 719 | 如果 ties events to rules 则 |
| 733 | 返回:1 |
| 名称 | 描述 |
|---|---|
| audit_filter_task | At process creation time, we can determine if system-call auditing is* completely disabled for this task. Since we only have the task* structure at this point, we can only check uid and gid. |
| audit_filter_syscall | At syscall entry and exit time, this filter is called if the* audit_state is not low enough that auditing cannot take place, but is* also not high enough that we already know we have to write an audit* record (i |
| audit_filter_inode_name | Given an audit_name check the inode hash table to see if they match.* Called holding the rcu read lock to protect the use of audit_inode_hash |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |