]> git.baikalelectronics.ru Git - kernel.git/commit
namei: allow set_root() to produce errors
authorAleksa Sarai <cyphar@cyphar.com>
Fri, 6 Dec 2019 14:13:29 +0000 (01:13 +1100)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 9 Dec 2019 00:09:39 +0000 (19:09 -0500)
commiteb76636ffb62b744b33d34a413b11f92891a6a50
tree807afa27c82fc7dfcb37df102180ee55f8f4d1a6
parentb1c4b5b50fd694fe82c049ced7665765b0749784
namei: allow set_root() to produce errors

For LOOKUP_BENEATH and LOOKUP_IN_ROOT it is necessary to ensure that
set_root() is never called, and thus (for hardening purposes) it should
return an error rather than permit a breakout from the root. In
addition, move all of the repetitive set_root() calls to nd_jump_root().

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c