summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--security/apparmor/path.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/security/apparmor/path.c b/security/apparmor/path.c
index 3dd605c..8c90fd0 100644
--- a/security/apparmor/path.c
+++ b/security/apparmor/path.c
@@ -94,18 +94,21 @@ static int d_namespace_path(struct path *path, char *buf, int buflen,
} else
res = d_absolute_path(path, buf, buflen);
- *name = res;
/* handle error conditions - and still allow a partial path to
* be returned.
*/
if (IS_ERR(res)) {
- error = PTR_ERR(res);
- *name = buf;
- goto out;
- }
- if (!our_mnt(path->mnt))
+ res = dentry_path_raw(path->dentry, buf, buflen);
+ if (IS_ERR(res)) {
+ error = PTR_ERR(res);
+ *name = buf;
+ goto out;
+ };
+ } else if (!our_mnt(path->mnt))
connected = 0;
+ *name = res;
+
ok:
/* Handle two cases:
* 1. A deleted dentry && profile is not allowing mediation of deleted
OpenPOWER on IntegriCloud