mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00: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 <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
parent
89eda06837
commit
8b8efb4403
4 changed files with 25 additions and 0 deletions
|
@ -319,6 +319,11 @@ static int cap_path_chown(struct path *path, uid_t uid, gid_t gid)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cap_path_chroot(struct path *root)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int cap_file_permission(struct file *file, int mask)
|
||||
|
@ -990,6 +995,7 @@ void security_fixup_ops(struct security_operations *ops)
|
|||
set_to_cap_if_null(ops, path_truncate);
|
||||
set_to_cap_if_null(ops, path_chmod);
|
||||
set_to_cap_if_null(ops, path_chown);
|
||||
set_to_cap_if_null(ops, path_chroot);
|
||||
#endif
|
||||
set_to_cap_if_null(ops, file_permission);
|
||||
set_to_cap_if_null(ops, file_alloc_security);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue