aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/domain.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/tomoyo/domain.c')
-rw-r--r--security/tomoyo/domain.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/security/tomoyo/domain.c b/security/tomoyo/domain.c
index 34843971cc60..ec612ae87b51 100644
--- a/security/tomoyo/domain.c
+++ b/security/tomoyo/domain.c
@@ -130,28 +130,6 @@ struct tomoyo_alias_entry {
130}; 130};
131 131
132/** 132/**
133 * tomoyo_set_domain_flag - Set or clear domain's attribute flags.
134 *
135 * @domain: Pointer to "struct tomoyo_domain_info".
136 * @is_delete: True if it is a delete request.
137 * @flags: Flags to set or clear.
138 *
139 * Returns nothing.
140 */
141void tomoyo_set_domain_flag(struct tomoyo_domain_info *domain,
142 const bool is_delete, const u8 flags)
143{
144 /* We need to serialize because this is bitfield operation. */
145 static DEFINE_SPINLOCK(lock);
146 spin_lock(&lock);
147 if (!is_delete)
148 domain->flags |= flags;
149 else
150 domain->flags &= ~flags;
151 spin_unlock(&lock);
152}
153
154/**
155 * tomoyo_get_last_name - Get last component of a domainname. 133 * tomoyo_get_last_name - Get last component of a domainname.
156 * 134 *
157 * @domain: Pointer to "struct tomoyo_domain_info". 135 * @domain: Pointer to "struct tomoyo_domain_info".
@@ -896,8 +874,7 @@ int tomoyo_find_next_domain(struct linux_binprm *bprm)
896 if (is_enforce) 874 if (is_enforce)
897 retval = -EPERM; 875 retval = -EPERM;
898 else 876 else
899 tomoyo_set_domain_flag(old_domain, false, 877 old_domain->transition_failed = true;
900 TOMOYO_DOMAIN_FLAGS_TRANSITION_FAILED);
901 out: 878 out:
902 if (!domain) 879 if (!domain)
903 domain = old_domain; 880 domain = old_domain;