diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-08-02 15:12:13 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-08-02 15:12:13 -0700 |
commit | 87fe1adb66a514fa3abbe8bdb4278a5b2f421d8b (patch) | |
tree | 7ccabb83cbf8b72b05aaadc19286f5a01545fecb /security/security.c | |
parent | ea7099d5229c0fe9f9302b03a246e15e78b87011 (diff) | |
parent | 64b634830c919979de4b18163e15d30df66e64a8 (diff) | |
download | linux-87fe1adb66a514fa3abbe8bdb4278a5b2f421d8b.tar.bz2 |
Merge tag 'safesetid-6.0' of https://github.com/micah-morton/linux
Pull SafeSetID updates from Micah Morton:
"This contains one commit that touches common kernel code, one that
adds functionality internal to the SafeSetID LSM code, and a few other
commits that only modify the SafeSetID LSM selftest.
The commit that touches common kernel code simply adds an LSM hook in
the setgroups() syscall that mirrors what is done for the existing LSM
hooks in the setuid() and setgid() syscalls. This commit combined with
the SafeSetID-specific one allow the LSM to filter setgroups() calls
according to configured rule sets in the same way that is already done
for setuid() and setgid()"
* tag 'safesetid-6.0' of https://github.com/micah-morton/linux:
LSM: SafeSetID: add setgroups() testing to selftest
LSM: SafeSetID: Add setgroups() security policy handling
security: Add LSM hook to setgroups() syscall
LSM: SafeSetID: add GID testing to selftest
LSM: SafeSetID: selftest cleanup and prepare for GIDs
LSM: SafeSetID: fix userns bug in selftest
Diffstat (limited to 'security/security.c')
-rw-r--r-- | security/security.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/security/security.c b/security/security.c index f85afb02ea1c..14d30fec8a00 100644 --- a/security/security.c +++ b/security/security.c @@ -1804,6 +1804,11 @@ int security_task_fix_setgid(struct cred *new, const struct cred *old, return call_int_hook(task_fix_setgid, 0, new, old, flags); } +int security_task_fix_setgroups(struct cred *new, const struct cred *old) +{ + return call_int_hook(task_fix_setgroups, 0, new, old); +} + int security_task_setpgid(struct task_struct *p, pid_t pgid) { return call_int_hook(task_setpgid, 0, p, pgid); |