diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2009-10-04 08:49:48 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-10-11 19:56:02 -0400 |
commit | 8b8efb44033c7e86b3dc76f825c693ec92ae30e9 (patch) | |
tree | 8cf43afc59f88f36a86f3a8165770bccec28b3c3 /fs | |
parent | 89eda06837094ce9f34fae269b8773fcfd70f046 (diff) |
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 <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/open.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -587,6 +587,9 @@ SYSCALL_DEFINE1(chroot, const char __user *, filename) | |||
587 | error = -EPERM; | 587 | error = -EPERM; |
588 | if (!capable(CAP_SYS_CHROOT)) | 588 | if (!capable(CAP_SYS_CHROOT)) |
589 | goto dput_and_out; | 589 | goto dput_and_out; |
590 | error = security_path_chroot(&path); | ||
591 | if (error) | ||
592 | goto dput_and_out; | ||
590 | 593 | ||
591 | set_fs_root(current->fs, &path); | 594 | set_fs_root(current->fs, &path); |
592 | error = 0; | 595 | error = 0; |