Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292308
b: refs/heads/master
c: 7d7473d
h: refs/heads/master
v: v3
  • Loading branch information
Tetsuo Handa authored and James Morris committed Mar 20, 2012
1 parent 909acae commit fdb01c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b01d3fb921df9baef1ecd13704f4b1e269b58b6b
refs/heads/master: 7d7473dbdb9121dd1b5939566660d51130ecda3a
9 changes: 5 additions & 4 deletions trunk/security/tomoyo/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ static int tomoyo_write_task(struct tomoyo_acl_param *param)
*
* @domainname: The name of domain.
*
* Returns 0.
* Returns 0 on success, negative value otherwise.
*
* Caller holds tomoyo_read_lock().
*/
Expand All @@ -1081,7 +1081,7 @@ static int tomoyo_delete_domain(char *domainname)
name.name = domainname;
tomoyo_fill_path_info(&name);
if (mutex_lock_interruptible(&tomoyo_policy_lock))
return 0;
return -EINTR;
/* Is there an active domain? */
list_for_each_entry_rcu(domain, &tomoyo_domain_list, list) {
/* Never delete tomoyo_kernel_domain */
Expand Down Expand Up @@ -1164,15 +1164,16 @@ static int tomoyo_write_domain(struct tomoyo_io_buffer *head)
bool is_select = !is_delete && tomoyo_str_starts(&data, "select ");
unsigned int profile;
if (*data == '<') {
int ret = 0;
domain = NULL;
if (is_delete)
tomoyo_delete_domain(data);
ret = tomoyo_delete_domain(data);
else if (is_select)
domain = tomoyo_find_domain(data);
else
domain = tomoyo_assign_domain(data, false);
head->w.domain = domain;
return 0;
return ret;
}
if (!domain)
return -EINVAL;
Expand Down

0 comments on commit fdb01c0

Please sign in to comment.