提交 28042fab 编写于 作者: J John Johansen

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: NJohn Johansen <john.johansen@canonical.com>
Acked-by: NKees Cook <kees@ubuntu.com>
上级 38305a4b
...@@ -91,9 +91,8 @@ static int d_namespace_path(struct path *path, char *buf, int buflen, ...@@ -91,9 +91,8 @@ static int d_namespace_path(struct path *path, char *buf, int buflen,
} }
path_put(&root); path_put(&root);
connected = 0; connected = 0;
} } else
res = d_absolute_path(path, buf, buflen);
res = d_absolute_path(path, buf, buflen);
*name = res; *name = res;
/* handle error conditions - and still allow a partial path to /* handle error conditions - and still allow a partial path to
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册