Lines Matching refs:ns
347 void tomoyo_init_policy_namespace(struct tomoyo_policy_namespace *ns) in tomoyo_init_policy_namespace() argument
352 INIT_LIST_HEAD(&ns->acl_group[idx]); in tomoyo_init_policy_namespace()
354 INIT_LIST_HEAD(&ns->group_list[idx]); in tomoyo_init_policy_namespace()
356 INIT_LIST_HEAD(&ns->policy_list[idx]); in tomoyo_init_policy_namespace()
357 ns->profile_version = 20150505; in tomoyo_init_policy_namespace()
359 list_add_tail_rcu(&ns->namespace_list, &tomoyo_namespace_list); in tomoyo_init_policy_namespace()
374 container_of(head->r.ns, in tomoyo_print_namespace()
491 (struct tomoyo_policy_namespace *ns, const unsigned int profile) in tomoyo_assign_profile() argument
498 ptr = ns->profile_ptr[profile]; in tomoyo_assign_profile()
504 ptr = ns->profile_ptr[profile]; in tomoyo_assign_profile()
517 ns->profile_ptr[profile] = ptr; in tomoyo_assign_profile()
534 struct tomoyo_profile *tomoyo_profile(const struct tomoyo_policy_namespace *ns, in tomoyo_profile() argument
538 struct tomoyo_profile *ptr = ns->profile_ptr[profile]; in tomoyo_profile()
681 if (sscanf(data, "PROFILE_VERSION=%u", &head->w.ns->profile_version) in tomoyo_write_profile()
688 profile = tomoyo_assign_profile(head->w.ns, i); in tomoyo_write_profile()
747 struct tomoyo_policy_namespace *ns = in tomoyo_read_profile() local
748 container_of(head->r.ns, typeof(*ns), namespace_list); in tomoyo_read_profile()
755 profile = ns->profile_ptr[index]; in tomoyo_read_profile()
760 ns->profile_version); in tomoyo_read_profile()
766 if (ns->profile_ptr[head->r.index]) in tomoyo_read_profile()
1126 static int tomoyo_write_domain2(struct tomoyo_policy_namespace *ns, in tomoyo_write_domain2() argument
1131 .ns = ns, in tomoyo_write_domain2()
1175 struct tomoyo_policy_namespace *ns; in tomoyo_write_domain() local
1196 ns = domain->ns; in tomoyo_write_domain()
1199 if (!tomoyo_policy_loaded || ns->profile_ptr[idx]) in tomoyo_write_domain()
1220 return tomoyo_write_domain2(ns, &domain->acl_info_list, data, in tomoyo_write_domain()
1760 .ns = head->w.ns, in tomoyo_write_exception()
1781 (head->w.ns, &head->w.ns->acl_group[group], in tomoyo_write_exception()
1799 struct tomoyo_policy_namespace *ns = in tomoyo_read_group() local
1800 container_of(head->r.ns, typeof(*ns), namespace_list); in tomoyo_read_group()
1801 struct list_head *list = &ns->group_list[idx]; in tomoyo_read_group()
1858 struct tomoyo_policy_namespace *ns = in tomoyo_read_policy() local
1859 container_of(head->r.ns, typeof(*ns), namespace_list); in tomoyo_read_policy()
1860 struct list_head *list = &ns->policy_list[idx]; in tomoyo_read_policy()
1918 struct tomoyo_policy_namespace *ns = in tomoyo_read_exception() local
1919 container_of(head->r.ns, typeof(*ns), namespace_list); in tomoyo_read_exception()
1937 if (!tomoyo_read_domain2(head, &ns->acl_group in tomoyo_read_exception()
2042 if (!tomoyo_write_domain2(domain->ns, &domain->acl_info_list, buffer, in tomoyo_add_entry()
2542 struct list_head *ns; in tomoyo_set_namespace_cursor() local
2551 ns = head->r.ns; in tomoyo_set_namespace_cursor()
2552 if (!ns || (head->r.eof && ns->next != &tomoyo_namespace_list)) { in tomoyo_set_namespace_cursor()
2555 head->r.ns = ns ? ns->next : tomoyo_namespace_list.next; in tomoyo_set_namespace_cursor()
2570 head->r.ns->next != &tomoyo_namespace_list; in tomoyo_has_more_namespace()
2632 head->w.ns = tomoyo_assign_namespace(line); in tomoyo_parse_policy()
2635 head->w.ns = NULL; in tomoyo_parse_policy()
2637 head->w.ns = &tomoyo_kernel_namespace; in tomoyo_parse_policy()
2639 if (!head->w.ns) in tomoyo_parse_policy()
2702 head->w.ns = &tomoyo_kernel_namespace; in tomoyo_write_control()
2783 struct tomoyo_policy_namespace *ns = domain->ns; in tomoyo_check_profile() local
2785 if (ns->profile_version == 20110903) { in tomoyo_check_profile()
2788 ns->profile_version = 20150505; in tomoyo_check_profile()
2790 if (ns->profile_version != 20150505) in tomoyo_check_profile()
2792 ns->profile_version); in tomoyo_check_profile()
2793 else if (!ns->profile_ptr[profile]) in tomoyo_check_profile()