Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210342
b: refs/heads/master
c: 999b4f0
h: refs/heads/master
v: v3
  • Loading branch information
John Johansen authored and James Morris committed Sep 7, 2010
1 parent 49aa6ac commit 021a1d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 04ccd53f09741c4bc54ab36db000bc1383e4812e
refs/heads/master: 999b4f0aa2314b76857775334cb94bafa053db64
6 changes: 4 additions & 2 deletions trunk/security/apparmor/policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,12 +1151,14 @@ ssize_t aa_remove_profiles(char *fqname, size_t size)
/* released below */
ns = aa_get_namespace(root);

write_lock(&ns->lock);
if (!name) {
/* remove namespace - can only happen if fqname[0] == ':' */
write_lock(&ns->parent->lock);
__remove_namespace(ns);
write_unlock(&ns->parent->lock);
} else {
/* remove profile */
write_lock(&ns->lock);
profile = aa_get_profile(__lookup_profile(&ns->base, name));
if (!profile) {
error = -ENOENT;
Expand All @@ -1165,8 +1167,8 @@ ssize_t aa_remove_profiles(char *fqname, size_t size)
}
name = profile->base.hname;
__remove_profile(profile);
write_unlock(&ns->lock);
}
write_unlock(&ns->lock);

/* don't fail removal if audit fails */
(void) audit_policy(OP_PROF_RM, GFP_KERNEL, name, info, error);
Expand Down

0 comments on commit 021a1d3

Please sign in to comment.