Lines Matching refs:ns

343 void tomoyo_init_policy_namespace(struct tomoyo_policy_namespace *ns)  in tomoyo_init_policy_namespace()  argument
347 INIT_LIST_HEAD(&ns->acl_group[idx]); in tomoyo_init_policy_namespace()
349 INIT_LIST_HEAD(&ns->group_list[idx]); in tomoyo_init_policy_namespace()
351 INIT_LIST_HEAD(&ns->policy_list[idx]); in tomoyo_init_policy_namespace()
352 ns->profile_version = 20110903; in tomoyo_init_policy_namespace()
354 list_add_tail_rcu(&ns->namespace_list, &tomoyo_namespace_list); in tomoyo_init_policy_namespace()
369 container_of(head->r.ns, in tomoyo_print_namespace()
485 (struct tomoyo_policy_namespace *ns, const unsigned int profile) in tomoyo_assign_profile() argument
491 ptr = ns->profile_ptr[profile]; in tomoyo_assign_profile()
497 ptr = ns->profile_ptr[profile]; in tomoyo_assign_profile()
510 ns->profile_ptr[profile] = ptr; in tomoyo_assign_profile()
527 struct tomoyo_profile *tomoyo_profile(const struct tomoyo_policy_namespace *ns, in tomoyo_profile() argument
531 struct tomoyo_profile *ptr = ns->profile_ptr[profile]; in tomoyo_profile()
666 if (sscanf(data, "PROFILE_VERSION=%u", &head->w.ns->profile_version) in tomoyo_write_profile()
673 profile = tomoyo_assign_profile(head->w.ns, i); in tomoyo_write_profile()
731 struct tomoyo_policy_namespace *ns = in tomoyo_read_profile() local
732 container_of(head->r.ns, typeof(*ns), namespace_list); in tomoyo_read_profile()
738 profile = ns->profile_ptr[index]; in tomoyo_read_profile()
743 ns->profile_version); in tomoyo_read_profile()
749 if (ns->profile_ptr[head->r.index]) in tomoyo_read_profile()
1100 static int tomoyo_write_domain2(struct tomoyo_policy_namespace *ns, in tomoyo_write_domain2() argument
1105 .ns = ns, in tomoyo_write_domain2()
1149 struct tomoyo_policy_namespace *ns; in tomoyo_write_domain() local
1168 ns = domain->ns; in tomoyo_write_domain()
1171 if (!tomoyo_policy_loaded || ns->profile_ptr[profile]) in tomoyo_write_domain()
1188 return tomoyo_write_domain2(ns, &domain->acl_info_list, data, in tomoyo_write_domain()
1707 .ns = head->w.ns, in tomoyo_write_exception()
1726 (head->w.ns, &head->w.ns->acl_group[group], in tomoyo_write_exception()
1744 struct tomoyo_policy_namespace *ns = in tomoyo_read_group() local
1745 container_of(head->r.ns, typeof(*ns), namespace_list); in tomoyo_read_group()
1746 struct list_head *list = &ns->group_list[idx]; in tomoyo_read_group()
1800 struct tomoyo_policy_namespace *ns = in tomoyo_read_policy() local
1801 container_of(head->r.ns, typeof(*ns), namespace_list); in tomoyo_read_policy()
1802 struct list_head *list = &ns->policy_list[idx]; in tomoyo_read_policy()
1857 struct tomoyo_policy_namespace *ns = in tomoyo_read_exception() local
1858 container_of(head->r.ns, typeof(*ns), namespace_list); in tomoyo_read_exception()
1875 if (!tomoyo_read_domain2(head, &ns->acl_group in tomoyo_read_exception()
1978 if (!tomoyo_write_domain2(domain->ns, &domain->acl_info_list, buffer, in tomoyo_add_entry()
2472 struct list_head *ns; in tomoyo_set_namespace_cursor() local
2480 ns = head->r.ns; in tomoyo_set_namespace_cursor()
2481 if (!ns || (head->r.eof && ns->next != &tomoyo_namespace_list)) { in tomoyo_set_namespace_cursor()
2484 head->r.ns = ns ? ns->next : tomoyo_namespace_list.next; in tomoyo_set_namespace_cursor()
2499 head->r.ns->next != &tomoyo_namespace_list; in tomoyo_has_more_namespace()
2560 head->w.ns = tomoyo_assign_namespace(line); in tomoyo_parse_policy()
2563 head->w.ns = NULL; in tomoyo_parse_policy()
2565 head->w.ns = &tomoyo_kernel_namespace; in tomoyo_parse_policy()
2567 if (!head->w.ns) in tomoyo_parse_policy()
2627 head->w.ns = &tomoyo_kernel_namespace; in tomoyo_write_control()
2706 const struct tomoyo_policy_namespace *ns = domain->ns; in tomoyo_check_profile() local
2707 if (ns->profile_version != 20110903) in tomoyo_check_profile()
2710 ns->profile_version); in tomoyo_check_profile()
2711 else if (!ns->profile_ptr[profile]) in tomoyo_check_profile()