• Home
  • Raw
  • Download

Lines Matching refs:n

150 	unsigned n;  in audit_match_perm()  local
154 n = ctx->major; in audit_match_perm()
156 switch (audit_classify_syscall(ctx->arch, n)) { in audit_match_perm()
159 audit_match_class(AUDIT_CLASS_WRITE, n)) in audit_match_perm()
162 audit_match_class(AUDIT_CLASS_READ, n)) in audit_match_perm()
165 audit_match_class(AUDIT_CLASS_CHATTR, n)) in audit_match_perm()
170 audit_match_class(AUDIT_CLASS_WRITE_32, n)) in audit_match_perm()
173 audit_match_class(AUDIT_CLASS_READ_32, n)) in audit_match_perm()
176 audit_match_class(AUDIT_CLASS_CHATTR_32, n)) in audit_match_perm()
196 struct audit_names *n; in audit_match_filetype() local
202 list_for_each_entry(n, &ctx->names_list, list) { in audit_match_filetype()
203 if ((n->ino != AUDIT_INO_UNSET) && in audit_match_filetype()
204 ((n->mode & S_IFMT) == mode)) in audit_match_filetype()
272 int n; in unroll_tree_refs() local
282 n = count; in unroll_tree_refs()
283 for (q = p; q != ctx->trees; q = q->next, n = 31) { in unroll_tree_refs()
284 while (n--) { in unroll_tree_refs()
285 audit_put_chunk(q->c[n]); in unroll_tree_refs()
286 q->c[n] = NULL; in unroll_tree_refs()
289 while (n-- > ctx->tree_count) { in unroll_tree_refs()
290 audit_put_chunk(q->c[n]); in unroll_tree_refs()
291 q->c[n] = NULL; in unroll_tree_refs()
310 int n; in match_tree_refs() local
316 for (n = 0; n < 31; n++) in match_tree_refs()
317 if (audit_tree_match(p->c[n], tree)) in match_tree_refs()
322 for (n = ctx->tree_count; n < 31; n++) in match_tree_refs()
323 if (audit_tree_match(p->c[n], tree)) in match_tree_refs()
334 struct audit_names *n; in audit_compare_uid() local
344 list_for_each_entry(n, &ctx->names_list, list) { in audit_compare_uid()
345 rc = audit_uid_comparator(uid, f->op, n->uid); in audit_compare_uid()
358 struct audit_names *n; in audit_compare_gid() local
368 list_for_each_entry(n, &ctx->names_list, list) { in audit_compare_gid()
369 rc = audit_gid_comparator(gid, f->op, n->gid); in audit_compare_gid()
480 struct audit_names *n; in audit_filter_rules() local
569 list_for_each_entry(n, &ctx->names_list, list) { in audit_filter_rules()
570 if (audit_comparator(MAJOR(n->dev), f->op, f->val) || in audit_filter_rules()
571 audit_comparator(MAJOR(n->rdev), f->op, f->val)) { in audit_filter_rules()
584 list_for_each_entry(n, &ctx->names_list, list) { in audit_filter_rules()
585 if (audit_comparator(MINOR(n->dev), f->op, f->val) || in audit_filter_rules()
586 audit_comparator(MINOR(n->rdev), f->op, f->val)) { in audit_filter_rules()
597 list_for_each_entry(n, &ctx->names_list, list) { in audit_filter_rules()
598 if (audit_comparator(n->ino, f->op, f->val)) { in audit_filter_rules()
609 list_for_each_entry(n, &ctx->names_list, list) { in audit_filter_rules()
610 if (audit_uid_comparator(n->uid, f->op, f->uid)) { in audit_filter_rules()
621 list_for_each_entry(n, &ctx->names_list, list) { in audit_filter_rules()
622 if (audit_gid_comparator(n->gid, f->op, f->gid)) { in audit_filter_rules()
702 list_for_each_entry(n, &ctx->names_list, list) { in audit_filter_rules()
704 n->osid, in audit_filter_rules()
869 struct audit_names *n, in audit_filter_inode_name() argument
871 int h = audit_hash_ino((u32)n->ino); in audit_filter_inode_name()
878 audit_filter_rules(tsk, &e->rule, ctx, n, &state, false)) { in audit_filter_inode_name()
893 struct audit_names *n; in audit_filter_inodes() local
900 list_for_each_entry(n, &ctx->names_list, list) { in audit_filter_inodes()
901 if (audit_filter_inode_name(tsk, n, ctx)) in audit_filter_inodes()
923 struct audit_names *n, *next; in audit_free_names() local
925 list_for_each_entry_safe(n, next, &context->names_list, list) { in audit_free_names()
926 list_del(&n->list); in audit_free_names()
927 if (n->name) in audit_free_names()
928 putname(n->name); in audit_free_names()
929 if (n->should_free) in audit_free_names()
930 kfree(n); in audit_free_names()
1509 static void audit_log_name(struct audit_context *context, struct audit_names *n, in audit_log_name() argument
1522 else if (n->name) { in audit_log_name()
1523 switch (n->name_len) { in audit_log_name()
1527 audit_log_untrustedstring(ab, n->name->name); in audit_log_name()
1541 audit_log_n_untrustedstring(ab, n->name->name, in audit_log_name()
1542 n->name_len); in audit_log_name()
1547 if (n->ino != AUDIT_INO_UNSET) in audit_log_name()
1549 n->ino, in audit_log_name()
1550 MAJOR(n->dev), in audit_log_name()
1551 MINOR(n->dev), in audit_log_name()
1552 n->mode, in audit_log_name()
1553 from_kuid(&init_user_ns, n->uid), in audit_log_name()
1554 from_kgid(&init_user_ns, n->gid), in audit_log_name()
1555 MAJOR(n->rdev), in audit_log_name()
1556 MINOR(n->rdev)); in audit_log_name()
1557 if (n->osid != 0) { in audit_log_name()
1562 n->osid, &ctx, &len)) { in audit_log_name()
1563 audit_log_format(ab, " osid=%u", n->osid); in audit_log_name()
1573 switch (n->type) { in audit_log_name()
1591 audit_log_fcaps(ab, n); in audit_log_name()
1680 struct audit_names *n; in audit_log_exit() local
1800 list_for_each_entry(n, &context->names_list, list) { in audit_log_exit()
1801 if (n->hidden) in audit_log_exit()
1803 audit_log_name(context, n, NULL, i++, &call_panic); in audit_log_exit()
2205 struct audit_names *n; in __audit_reusename() local
2207 list_for_each_entry(n, &context->names_list, list) { in __audit_reusename()
2208 if (!n->name) in __audit_reusename()
2210 if (n->name->uptr == uptr) { in __audit_reusename()
2211 n->name->refcnt++; in __audit_reusename()
2212 return n->name; in __audit_reusename()
2228 struct audit_names *n; in __audit_getname() local
2233 n = audit_alloc_name(context, AUDIT_TYPE_UNKNOWN); in __audit_getname()
2234 if (!n) in __audit_getname()
2237 n->name = name; in __audit_getname()
2238 n->name_len = AUDIT_NAME_FULL; in __audit_getname()
2239 name->aname = n; in __audit_getname()
2296 struct audit_names *n; in __audit_inode() local
2328 n = name->aname; in __audit_inode()
2329 if (n) { in __audit_inode()
2331 if (n->type == AUDIT_TYPE_PARENT || in __audit_inode()
2332 n->type == AUDIT_TYPE_UNKNOWN) in __audit_inode()
2335 if (n->type != AUDIT_TYPE_PARENT) in __audit_inode()
2340 list_for_each_entry_reverse(n, &context->names_list, list) { in __audit_inode()
2341 if (n->ino) { in __audit_inode()
2343 if (n->ino != inode->i_ino || in __audit_inode()
2344 n->dev != inode->i_sb->s_dev) in __audit_inode()
2346 } else if (n->name) { in __audit_inode()
2348 if (strcmp(n->name->name, name->name)) in __audit_inode()
2356 if (n->type == AUDIT_TYPE_PARENT || in __audit_inode()
2357 n->type == AUDIT_TYPE_UNKNOWN) in __audit_inode()
2360 if (n->type != AUDIT_TYPE_PARENT) in __audit_inode()
2367 n = audit_alloc_name(context, AUDIT_TYPE_UNKNOWN); in __audit_inode()
2368 if (!n) in __audit_inode()
2371 n->name = name; in __audit_inode()
2377 n->name_len = n->name ? parent_len(n->name->name) : AUDIT_NAME_FULL; in __audit_inode()
2378 n->type = AUDIT_TYPE_PARENT; in __audit_inode()
2380 n->hidden = true; in __audit_inode()
2382 n->name_len = AUDIT_NAME_FULL; in __audit_inode()
2383 n->type = AUDIT_TYPE_NORMAL; in __audit_inode()
2386 audit_copy_inode(n, dentry, inode, flags & AUDIT_INODE_NOEVAL); in __audit_inode()
2415 struct audit_names *n, *found_parent = NULL, *found_child = NULL; in __audit_inode_child() local
2443 list_for_each_entry(n, &context->names_list, list) { in __audit_inode_child()
2444 if (!n->name || in __audit_inode_child()
2445 (n->type != AUDIT_TYPE_PARENT && in __audit_inode_child()
2446 n->type != AUDIT_TYPE_UNKNOWN)) in __audit_inode_child()
2449 if (n->ino == parent->i_ino && n->dev == parent->i_sb->s_dev && in __audit_inode_child()
2451 n->name->name, n->name_len)) { in __audit_inode_child()
2452 if (n->type == AUDIT_TYPE_UNKNOWN) in __audit_inode_child()
2453 n->type = AUDIT_TYPE_PARENT; in __audit_inode_child()
2454 found_parent = n; in __audit_inode_child()
2462 list_for_each_entry(n, &context->names_list, list) { in __audit_inode_child()
2464 if (!n->name || in __audit_inode_child()
2465 (n->type != type && n->type != AUDIT_TYPE_UNKNOWN)) in __audit_inode_child()
2468 if (!strcmp(dname->name, n->name->name) || in __audit_inode_child()
2469 !audit_compare_dname_path(dname, n->name->name, in __audit_inode_child()
2473 if (n->type == AUDIT_TYPE_UNKNOWN) in __audit_inode_child()
2474 n->type = type; in __audit_inode_child()
2475 found_child = n; in __audit_inode_child()
2482 n = audit_alloc_name(context, AUDIT_TYPE_PARENT); in __audit_inode_child()
2483 if (!n) in __audit_inode_child()
2485 audit_copy_inode(n, NULL, parent, 0); in __audit_inode_child()