diff options
author | John Johansen <john.johansen@canonical.com> | 2012-02-16 09:21:30 -0500 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2012-02-27 14:38:23 -0500 |
commit | 28042fabf43b9a8ccfaa38f8c8187cc525e53fd3 (patch) | |
tree | f881ccfdb821608683bebf4013a572464e798657 /security/apparmor/path.c | |
parent | 38305a4bab4be5d278443b057f7f5e97afb07f26 (diff) |
AppArmor: Fix the error case for chroot relative path name lookup
When a chroot relative pathname lookup fails it is falling through to
do a d_absolute_path lookup. This is incorrect as d_absolute_path should
only be used to lookup names for namespace absolute paths.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
Diffstat (limited to 'security/apparmor/path.c')
-rw-r--r-- | security/apparmor/path.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/security/apparmor/path.c b/security/apparmor/path.c index 9d070a7c3ff..c31ce837fef 100644 --- a/security/apparmor/path.c +++ b/security/apparmor/path.c | |||
@@ -91,9 +91,8 @@ static int d_namespace_path(struct path *path, char *buf, int buflen, | |||
91 | } | 91 | } |
92 | path_put(&root); | 92 | path_put(&root); |
93 | connected = 0; | 93 | connected = 0; |
94 | } | 94 | } else |
95 | 95 | res = d_absolute_path(path, buf, buflen); | |
96 | res = d_absolute_path(path, buf, buflen); | ||
97 | 96 | ||
98 | *name = res; | 97 | *name = res; |
99 | /* handle error conditions - and still allow a partial path to | 98 | /* handle error conditions - and still allow a partial path to |