• Home
  • Raw
  • Download

Lines Matching refs:tsk

377 static int audit_field_compare(struct task_struct *tsk,  in audit_field_compare()  argument
394 return audit_compare_uid(audit_get_loginuid(tsk), name, f, ctx); in audit_field_compare()
406 audit_get_loginuid(tsk)); in audit_field_compare()
415 return audit_uid_comparator(audit_get_loginuid(tsk), f->op, in audit_field_compare()
418 return audit_uid_comparator(audit_get_loginuid(tsk), f->op, in audit_field_compare()
421 return audit_uid_comparator(audit_get_loginuid(tsk), f->op, in audit_field_compare()
461 static int audit_filter_rules(struct task_struct *tsk, in audit_filter_rules() argument
476 cred = rcu_dereference_check(tsk->cred, tsk == current || task_creation); in audit_filter_rules()
486 pid = task_tgid_nr(tsk); in audit_filter_rules()
492 ctx->ppid = task_ppid_nr(tsk); in audit_filter_rules()
497 result = audit_exe_compare(tsk, rule->exe); in audit_filter_rules()
540 sessionid = audit_get_sessionid(tsk); in audit_filter_rules()
544 result = audit_comparator(tsk->personality, f->op, f->val); in audit_filter_rules()
646 result = audit_uid_comparator(audit_get_loginuid(tsk), in audit_filter_rules()
650 result = audit_comparator(audit_loginuid_set(tsk), f->op, f->val); in audit_filter_rules()
744 result = audit_field_compare(tsk, cred, f, ctx, name); in audit_filter_rules()
773 static enum audit_state audit_filter_task(struct task_struct *tsk, char **key) in audit_filter_task() argument
780 if (audit_filter_rules(tsk, &e->rule, NULL, NULL, in audit_filter_task()
813 static void audit_filter_uring(struct task_struct *tsk, in audit_filter_uring() argument
819 if (auditd_test_task(tsk)) in audit_filter_uring()
826 audit_filter_rules(tsk, &e->rule, ctx, NULL, &state, in audit_filter_uring()
841 static void audit_filter_syscall(struct task_struct *tsk, in audit_filter_syscall() argument
847 if (auditd_test_task(tsk)) in audit_filter_syscall()
853 audit_filter_rules(tsk, &e->rule, ctx, NULL, in audit_filter_syscall()
868 static int audit_filter_inode_name(struct task_struct *tsk, in audit_filter_inode_name() argument
878 audit_filter_rules(tsk, &e->rule, ctx, n, &state, false)) { in audit_filter_inode_name()
891 void audit_filter_inodes(struct task_struct *tsk, struct audit_context *ctx) in audit_filter_inodes() argument
895 if (auditd_test_task(tsk)) in audit_filter_inodes()
901 if (audit_filter_inode_name(tsk, n, ctx)) in audit_filter_inodes()
1048 int audit_alloc(struct task_struct *tsk) in audit_alloc() argument
1057 state = audit_filter_task(tsk, &key); in audit_alloc()
1059 clear_task_syscall_work(tsk, SYSCALL_AUDIT); in audit_alloc()
1070 audit_set_context(tsk, context); in audit_alloc()
1071 set_task_syscall_work(tsk, SYSCALL_AUDIT); in audit_alloc()
1823 void __audit_free(struct task_struct *tsk) in __audit_free() argument
1825 struct audit_context *context = tsk->audit_context; in __audit_free()
1839 if (tsk == current && !context->dummy) { in __audit_free()
1843 audit_filter_syscall(tsk, context); in __audit_free()
1844 audit_filter_inodes(tsk, context); in __audit_free()
1849 audit_filter_uring(tsk, context); in __audit_free()
1850 audit_filter_inodes(tsk, context); in __audit_free()
1856 audit_set_context(tsk, NULL); in __audit_free()