Lines Matching refs:f
326 struct audit_field *f, in audit_compare_uid() argument
333 rc = audit_uid_comparator(uid, f->op, name->uid); in audit_compare_uid()
340 rc = audit_uid_comparator(uid, f->op, n->uid); in audit_compare_uid()
350 struct audit_field *f, in audit_compare_gid() argument
357 rc = audit_gid_comparator(gid, f->op, name->gid); in audit_compare_gid()
364 rc = audit_gid_comparator(gid, f->op, n->gid); in audit_compare_gid()
374 struct audit_field *f, in audit_field_compare() argument
378 switch (f->val) { in audit_field_compare()
381 return audit_compare_uid(cred->uid, name, f, ctx); in audit_field_compare()
383 return audit_compare_gid(cred->gid, name, f, ctx); in audit_field_compare()
385 return audit_compare_uid(cred->euid, name, f, ctx); in audit_field_compare()
387 return audit_compare_gid(cred->egid, name, f, ctx); in audit_field_compare()
389 return audit_compare_uid(tsk->loginuid, name, f, ctx); in audit_field_compare()
391 return audit_compare_uid(cred->suid, name, f, ctx); in audit_field_compare()
393 return audit_compare_gid(cred->sgid, name, f, ctx); in audit_field_compare()
395 return audit_compare_uid(cred->fsuid, name, f, ctx); in audit_field_compare()
397 return audit_compare_gid(cred->fsgid, name, f, ctx); in audit_field_compare()
400 return audit_uid_comparator(cred->uid, f->op, tsk->loginuid); in audit_field_compare()
402 return audit_uid_comparator(cred->uid, f->op, cred->euid); in audit_field_compare()
404 return audit_uid_comparator(cred->uid, f->op, cred->suid); in audit_field_compare()
406 return audit_uid_comparator(cred->uid, f->op, cred->fsuid); in audit_field_compare()
409 return audit_uid_comparator(tsk->loginuid, f->op, cred->euid); in audit_field_compare()
411 return audit_uid_comparator(tsk->loginuid, f->op, cred->suid); in audit_field_compare()
413 return audit_uid_comparator(tsk->loginuid, f->op, cred->fsuid); in audit_field_compare()
416 return audit_uid_comparator(cred->euid, f->op, cred->suid); in audit_field_compare()
418 return audit_uid_comparator(cred->euid, f->op, cred->fsuid); in audit_field_compare()
421 return audit_uid_comparator(cred->suid, f->op, cred->fsuid); in audit_field_compare()
424 return audit_gid_comparator(cred->gid, f->op, cred->egid); in audit_field_compare()
426 return audit_gid_comparator(cred->gid, f->op, cred->sgid); in audit_field_compare()
428 return audit_gid_comparator(cred->gid, f->op, cred->fsgid); in audit_field_compare()
431 return audit_gid_comparator(cred->egid, f->op, cred->sgid); in audit_field_compare()
433 return audit_gid_comparator(cred->egid, f->op, cred->fsgid); in audit_field_compare()
436 return audit_gid_comparator(cred->sgid, f->op, cred->fsgid); in audit_field_compare()
466 struct audit_field *f = &rule->fields[i]; in audit_filter_rules() local
470 switch (f->type) { in audit_filter_rules()
472 result = audit_comparator(task_tgid_nr(tsk), f->op, f->val); in audit_filter_rules()
478 result = audit_comparator(ctx->ppid, f->op, f->val); in audit_filter_rules()
482 result = audit_uid_comparator(cred->uid, f->op, f->uid); in audit_filter_rules()
485 result = audit_uid_comparator(cred->euid, f->op, f->uid); in audit_filter_rules()
488 result = audit_uid_comparator(cred->suid, f->op, f->uid); in audit_filter_rules()
491 result = audit_uid_comparator(cred->fsuid, f->op, f->uid); in audit_filter_rules()
494 result = audit_gid_comparator(cred->gid, f->op, f->gid); in audit_filter_rules()
495 if (f->op == Audit_equal) { in audit_filter_rules()
497 result = in_group_p(f->gid); in audit_filter_rules()
498 } else if (f->op == Audit_not_equal) { in audit_filter_rules()
500 result = !in_group_p(f->gid); in audit_filter_rules()
504 result = audit_gid_comparator(cred->egid, f->op, f->gid); in audit_filter_rules()
505 if (f->op == Audit_equal) { in audit_filter_rules()
507 result = in_egroup_p(f->gid); in audit_filter_rules()
508 } else if (f->op == Audit_not_equal) { in audit_filter_rules()
510 result = !in_egroup_p(f->gid); in audit_filter_rules()
514 result = audit_gid_comparator(cred->sgid, f->op, f->gid); in audit_filter_rules()
517 result = audit_gid_comparator(cred->fsgid, f->op, f->gid); in audit_filter_rules()
520 result = audit_comparator(tsk->personality, f->op, f->val); in audit_filter_rules()
524 result = audit_comparator(ctx->arch, f->op, f->val); in audit_filter_rules()
529 result = audit_comparator(ctx->return_code, f->op, f->val); in audit_filter_rules()
533 if (f->val) in audit_filter_rules()
534 result = audit_comparator(ctx->return_valid, f->op, AUDITSC_SUCCESS); in audit_filter_rules()
536 result = audit_comparator(ctx->return_valid, f->op, AUDITSC_FAILURE); in audit_filter_rules()
541 if (audit_comparator(MAJOR(name->dev), f->op, f->val) || in audit_filter_rules()
542 audit_comparator(MAJOR(name->rdev), f->op, f->val)) in audit_filter_rules()
546 if (audit_comparator(MAJOR(n->dev), f->op, f->val) || in audit_filter_rules()
547 audit_comparator(MAJOR(n->rdev), f->op, f->val)) { in audit_filter_rules()
556 if (audit_comparator(MINOR(name->dev), f->op, f->val) || in audit_filter_rules()
557 audit_comparator(MINOR(name->rdev), f->op, f->val)) in audit_filter_rules()
561 if (audit_comparator(MINOR(n->dev), f->op, f->val) || in audit_filter_rules()
562 audit_comparator(MINOR(n->rdev), f->op, f->val)) { in audit_filter_rules()
571 result = (name->ino == f->val); in audit_filter_rules()
574 if (audit_comparator(n->ino, f->op, f->val)) { in audit_filter_rules()
583 result = audit_uid_comparator(name->uid, f->op, f->uid); in audit_filter_rules()
586 if (audit_uid_comparator(n->uid, f->op, f->uid)) { in audit_filter_rules()
595 result = audit_gid_comparator(name->gid, f->op, f->gid); in audit_filter_rules()
598 if (audit_gid_comparator(n->gid, f->op, f->gid)) { in audit_filter_rules()
616 result = audit_uid_comparator(tsk->loginuid, f->op, f->uid); in audit_filter_rules()
619 result = audit_comparator(audit_loginuid_set(tsk), f->op, f->val); in audit_filter_rules()
631 if (f->lsm_rule) { in audit_filter_rules()
636 result = security_audit_rule_match(sid, f->type, in audit_filter_rules()
637 f->op, in audit_filter_rules()
638 f->lsm_rule, in audit_filter_rules()
649 if (f->lsm_rule) { in audit_filter_rules()
653 name->osid, f->type, f->op, in audit_filter_rules()
654 f->lsm_rule, ctx); in audit_filter_rules()
657 if (security_audit_rule_match(n->osid, f->type, in audit_filter_rules()
658 f->op, f->lsm_rule, in audit_filter_rules()
669 f->type, f->op, in audit_filter_rules()
670 f->lsm_rule, ctx)) in audit_filter_rules()
679 result = audit_comparator(ctx->argv[f->type-AUDIT_ARG0], f->op, f->val); in audit_filter_rules()
686 result = audit_match_perm(ctx, f->val); in audit_filter_rules()
689 result = audit_match_filetype(ctx, f->val); in audit_filter_rules()
692 result = audit_field_compare(tsk, cred, f, ctx, name); in audit_filter_rules()