From f9611ac6a9758f42826a708561dcbfde7d7d3e38 Mon Sep 17 00:00:00 2001 From: John Johansen Date: Thu, 16 Feb 2012 06:28:50 -0800 Subject: [PATCH] --- yaml --- r: 292301 b: refs/heads/master c: fbba8d89acea5d628d1d076b1d8962db438ff832 h: refs/heads/master i: 292299: 5372bc3d6467f9c9f9e77d31a1be0599fa396c18 v: v3 --- [refs] | 2 +- trunk/security/apparmor/path.c | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 6744eb9a3c07..cf6f6118d955 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 33e521acff709d275950ec5bf8dd577d873cd61e +refs/heads/master: fbba8d89acea5d628d1d076b1d8962db438ff832 diff --git a/trunk/security/apparmor/path.c b/trunk/security/apparmor/path.c index 3dd605c69970..8c90fd0f49c5 100644 --- a/trunk/security/apparmor/path.c +++ b/trunk/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