• Home
  • Raw
  • Download

Lines Matching refs:f

80 			struct audit_field *f = &erule->fields[i];  in audit_free_rule()  local
81 kfree(f->lsm_str); in audit_free_rule()
82 security_audit_rule_free(f->lsm_rule); in audit_free_rule()
144 struct audit_field *f) in audit_to_inode() argument
148 (f->op != Audit_equal && f->op != Audit_not_equal)) in audit_to_inode()
151 krule->inode_f = f; in audit_to_inode()
314 static int audit_field_valid(struct audit_entry *entry, struct audit_field *f) in audit_field_valid() argument
316 switch(f->type) { in audit_field_valid()
324 switch(f->type) { in audit_field_valid()
347 if (f->op == Audit_bitmask || f->op == Audit_bittest) in audit_field_valid()
369 if ((f->val != 0) && (f->val != 1)) in audit_field_valid()
373 if (f->op != Audit_not_equal && f->op != Audit_equal) in audit_field_valid()
377 if (f->val & ~15) in audit_field_valid()
381 if (f->val & ~S_IFMT) in audit_field_valid()
385 if (f->val > AUDIT_MAX_FIELD_COMPARE) in audit_field_valid()
410 struct audit_field *f = &entry->rule.fields[i]; in audit_data_to_entry() local
414 f->op = audit_to_op(data->fieldflags[i]); in audit_data_to_entry()
415 if (f->op == Audit_bad) in audit_data_to_entry()
418 f->type = data->fields[i]; in audit_data_to_entry()
419 f->val = data->values[i]; in audit_data_to_entry()
420 f->uid = INVALID_UID; in audit_data_to_entry()
421 f->gid = INVALID_GID; in audit_data_to_entry()
422 f->lsm_str = NULL; in audit_data_to_entry()
423 f->lsm_rule = NULL; in audit_data_to_entry()
426 if ((f->type == AUDIT_LOGINUID) && (f->val == 4294967295)) { in audit_data_to_entry()
427 f->type = AUDIT_LOGINUID_SET; in audit_data_to_entry()
428 f->val = 0; in audit_data_to_entry()
431 err = audit_field_valid(entry, f); in audit_data_to_entry()
436 switch (f->type) { in audit_data_to_entry()
443 f->uid = make_kuid(current_user_ns(), f->val); in audit_data_to_entry()
444 if (!uid_valid(f->uid)) in audit_data_to_entry()
452 f->gid = make_kgid(current_user_ns(), f->val); in audit_data_to_entry()
453 if (!gid_valid(f->gid)) in audit_data_to_entry()
457 entry->rule.arch_f = f; in audit_data_to_entry()
469 str = audit_unpack_string(&bufp, &remain, f->val); in audit_data_to_entry()
472 entry->rule.buflen += f->val; in audit_data_to_entry()
474 err = security_audit_rule_init(f->type, f->op, str, in audit_data_to_entry()
475 (void **)&f->lsm_rule); in audit_data_to_entry()
487 f->lsm_str = str; in audit_data_to_entry()
490 str = audit_unpack_string(&bufp, &remain, f->val); in audit_data_to_entry()
493 entry->rule.buflen += f->val; in audit_data_to_entry()
495 err = audit_to_watch(&entry->rule, str, f->val, f->op); in audit_data_to_entry()
502 str = audit_unpack_string(&bufp, &remain, f->val); in audit_data_to_entry()
505 entry->rule.buflen += f->val; in audit_data_to_entry()
507 err = audit_make_tree(&entry->rule, str, f->op); in audit_data_to_entry()
513 err = audit_to_inode(&entry->rule, f); in audit_data_to_entry()
518 if (entry->rule.filterkey || f->val > AUDIT_MAX_KEY_LEN) in audit_data_to_entry()
520 str = audit_unpack_string(&bufp, &remain, f->val); in audit_data_to_entry()
523 entry->rule.buflen += f->val; in audit_data_to_entry()
572 struct audit_field *f = &krule->fields[i]; in audit_krule_to_data() local
574 data->fields[i] = f->type; in audit_krule_to_data()
575 data->fieldflags[i] = audit_ops[f->op]; in audit_krule_to_data()
576 switch(f->type) { in audit_krule_to_data()
588 audit_pack_string(&bufp, f->lsm_str); in audit_krule_to_data()
605 data->values[i] = f->val; in audit_krule_to_data()
1217 struct audit_field *f = &rule->fields[i]; in audit_filter_user_rules() local
1221 switch (f->type) { in audit_filter_user_rules()
1223 result = audit_comparator(task_pid_vnr(current), f->op, f->val); in audit_filter_user_rules()
1226 result = audit_uid_comparator(current_uid(), f->op, f->uid); in audit_filter_user_rules()
1229 result = audit_gid_comparator(current_gid(), f->op, f->gid); in audit_filter_user_rules()
1233 f->op, f->uid); in audit_filter_user_rules()
1237 f->op, f->val); in audit_filter_user_rules()
1240 result = audit_comparator(type, f->op, f->val); in audit_filter_user_rules()
1247 if (f->lsm_rule) { in audit_filter_user_rules()
1250 f->type, in audit_filter_user_rules()
1251 f->op, in audit_filter_user_rules()
1252 f->lsm_rule, in audit_filter_user_rules()
1300 struct audit_field *f = &e->rule.fields[i]; in audit_filter_type() local
1301 if (f->type == AUDIT_MSGTYPE) { in audit_filter_type()
1302 result = audit_comparator(type, f->op, f->val); in audit_filter_type()