dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
John Johansen 2012-02-16 06:21:30 -08:00
parent 38305a4bab
commit 28042fabf4
1 changed files with 2 additions and 3 deletions

View File

@ -91,9 +91,8 @@ static int d_namespace_path(struct path *path, char *buf, int buflen,
}
path_put(&root);
connected = 0;
}
res = d_absolute_path(path, buf, buflen);
} else
res = d_absolute_path(path, buf, buflen);
*name = res;
/* handle error conditions - and still allow a partial path to