mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
LSM: Add security_path_chroot().
This patch allows pathname based LSM modules to check chroot() operations. This hook is used by TOMOYO. Signed-off-by: Tetsuo Handa <[email protected]> Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
89eda06837
commit
8b8efb4403
4 changed files with 25 additions and 0 deletions
|
|
@ -587,6 +587,9 @@ SYSCALL_DEFINE1(chroot, const char __user *, filename)
|
|||
error = -EPERM;
|
||||
if (!capable(CAP_SYS_CHROOT))
|
||||
goto dput_and_out;
|
||||
error = security_path_chroot(&path);
|
||||
if (error)
|
||||
goto dput_and_out;
|
||||
|
||||
set_fs_root(current->fs, &path);
|
||||
error = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue