Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292302
b: refs/heads/master
c: 3372b68
h: refs/heads/master
v: v3
  • Loading branch information
John Johansen committed Mar 14, 2012
1 parent f9611ac commit f9de19c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 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: fbba8d89acea5d628d1d076b1d8962db438ff832
refs/heads/master: 3372b68a3c982611dcc30b3c872f8bbdee019e5e
16 changes: 6 additions & 10 deletions trunk/security/apparmor/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,18 @@ static int d_namespace_path(struct path *path, char *buf, int buflen,
struct path root;
get_fs_root(current->fs, &root);
res = __d_path(path, &root, buf, buflen);
if (res && !IS_ERR(res)) {
/* everything's fine */
*name = res;
path_put(&root);
goto ok;
}
path_put(&root);
connected = 0;
} else
} else {
res = d_absolute_path(path, buf, buflen);
if (!our_mnt(path->mnt))
connected = 0;
}

/* handle error conditions - and still allow a partial path to
* be returned.
*/
if (IS_ERR(res)) {
if (!res || IS_ERR(res)) {
connected = 0;
res = dentry_path_raw(path->dentry, buf, buflen);
if (IS_ERR(res)) {
error = PTR_ERR(res);
Expand All @@ -109,7 +106,6 @@ static int d_namespace_path(struct path *path, char *buf, int buflen,

*name = res;

ok:
/* Handle two cases:
* 1. A deleted dentry && profile is not allowing mediation of deleted
* 2. On some filesystems, newly allocated dentries appear to the
Expand Down

0 comments on commit f9de19c

Please sign in to comment.