summaryrefslogtreecommitdiffstats
path: root/include/linux/lsm_hook_defs.h
diff options
context:
space:
mode:
authorThomas Cedeno <thomascedeno@google.com>2020-06-09 10:22:13 -0700
committerMicah Morton <mortonm@chromium.org>2020-06-14 10:52:02 -0700
commit39030e1351aa1aa7443bb2da24426573077c83da (patch)
treef593d47dfb088f59bf3db1ce3be5ddc475af6218 /include/linux/lsm_hook_defs.h
parent3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162 (diff)
downloadlinux-39030e1351aa1aa7443bb2da24426573077c83da.tar.bz2
security: Add LSM hooks to set*gid syscalls
The SafeSetID LSM uses the security_task_fix_setuid hook to filter set*uid() syscalls according to its configured security policy. In preparation for adding analagous support in the LSM for set*gid() syscalls, we add the requisite hook here. Tested by putting print statements in the security_task_fix_setgid hook and seeing them get hit during kernel boot. Signed-off-by: Thomas Cedeno <thomascedeno@google.com> Signed-off-by: Micah Morton <mortonm@chromium.org>
Diffstat (limited to 'include/linux/lsm_hook_defs.h')
-rw-r--r--include/linux/lsm_hook_defs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h
index 5616b2567aa7..2a5a53a83ecb 100644
--- a/include/linux/lsm_hook_defs.h
+++ b/include/linux/lsm_hook_defs.h
@@ -190,6 +190,8 @@ LSM_HOOK(int, 0, kernel_post_read_file, struct file *file, char *buf,
loff_t size, enum kernel_read_file_id id)
LSM_HOOK(int, 0, task_fix_setuid, struct cred *new, const struct cred *old,
int flags)
+LSM_HOOK(int, 0, task_fix_setgid, struct cred *new, const struct cred * old,
+ int flags)
LSM_HOOK(int, 0, task_setpgid, struct task_struct *p, pid_t pgid)
LSM_HOOK(int, 0, task_getpgid, struct task_struct *p)
LSM_HOOK(int, 0, task_getsid, struct task_struct *p)