Lines Matching defs:domain
740 struct tomoyo_domain_info *domain = NULL;
757 domain = tomoyo_real_domain(p);
760 } else if (!strncmp(data, "domain=", 7)) {
762 domain = tomoyo_find_domain(data + 7);
765 head->write_var1 = domain;
771 head->r.eof = !domain;
772 head->r.domain = &domain->list;
774 if (domain && domain->is_deleted)
775 tomoyo_io_printf(head, "# This is a deleted domain.\n");
780 * tomoyo_delete_domain - Delete a domain.
782 * @domainname: The name of domain.
790 struct tomoyo_domain_info *domain;
797 /* Is there an active domain? */
798 list_for_each_entry_rcu(domain, &tomoyo_domain_list, list) {
800 if (domain == &tomoyo_kernel_domain)
802 if (domain->is_deleted ||
803 tomoyo_pathcmp(domain->domainname, &name))
805 domain->is_deleted = true;
813 * tomoyo_write_domain2 - Write domain policy.
821 static int tomoyo_write_domain2(char *data, struct tomoyo_domain_info *domain,
825 return tomoyo_write_mount(data, domain, is_delete);
826 return tomoyo_write_file(data, domain, is_delete);
830 * tomoyo_write_domain - Write domain policy.
841 struct tomoyo_domain_info *domain = head->write_var1;
856 domain = NULL;
860 domain = tomoyo_find_domain(data);
862 domain = tomoyo_assign_domain(data, 0);
863 head->write_var1 = domain;
866 if (!domain)
872 domain->profile = (u8) profile;
876 domain->ignore_global_allow_read = !is_delete;
880 domain->quota_warned = !is_delete;
884 domain->transition_failed = !is_delete;
887 return tomoyo_write_domain2(data, domain, is_delete);
998 * tomoyo_read_domain2 - Read domain policy.
1001 * @domain: Pointer to "struct tomoyo_domain_info".
1008 struct tomoyo_domain_info *domain)
1010 list_for_each_cookie(head->r.acl, &domain->acl_info_list) {
1021 * tomoyo_read_domain - Read domain policy.
1031 list_for_each_cookie(head->r.domain, &tomoyo_domain_list) {
1032 struct tomoyo_domain_info *domain =
1033 list_entry(head->r.domain, typeof(*domain), list);
1036 if (domain->is_deleted &&
1040 tomoyo_set_string(head, domain->domainname->name);
1044 domain->profile);
1045 if (domain->quota_warned)
1047 if (domain->transition_failed)
1049 if (domain->ignore_global_allow_read)
1057 if (!tomoyo_read_domain2(head, domain))
1074 * tomoyo_write_domain_profile - Assign profile for specified domain.
1091 struct tomoyo_domain_info *domain;
1097 domain = tomoyo_find_domain(cp + 1);
1100 if (domain && profile < TOMOYO_MAX_PROFILES
1102 domain->profile = (u8) profile;
1126 list_for_each_cookie(head->r.domain, &tomoyo_domain_list) {
1127 struct tomoyo_domain_info *domain =
1128 list_entry(head->r.domain, typeof(*domain), list);
1129 if (domain->is_deleted)
1133 tomoyo_io_printf(head, "%u ", domain->profile);
1134 tomoyo_set_string(head, domain->domainname->name);
1169 struct tomoyo_domain_info *domain = NULL;
1189 domain = tomoyo_real_domain(p);
1192 if (!domain)
1194 tomoyo_io_printf(head, "%u %u ", pid, domain->profile);
1195 tomoyo_set_string(head, domain->domainname->name);
1456 if (!r->domain)
1457 r->domain = tomoyo_domain();
1458 domainname = r->domain->domainname->name;
1531 tomoyo_write_domain2(buffer, r->domain, false);
1537 if (!r->domain)
1538 r->domain = tomoyo_domain();
1771 * because every process belongs to a domain and
1772 * the domain's name cannot be NULL.
2046 struct tomoyo_domain_info *domain;
2050 list_for_each_entry_rcu(domain, &tomoyo_domain_list, list) {
2051 const u8 profile = domain->profile;
2055 profile, domain->domainname->name);