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 /include/linux/security.h | |
parent | ea7099d5229c0fe9f9302b03a246e15e78b87011 (diff) | |
parent | 64b634830c919979de4b18163e15d30df66e64a8 (diff) | |
download | linux-87fe1adb66a514fa3abbe8bdb4278a5b2f421d8b.tar.gz linux-87fe1adb66a514fa3abbe8bdb4278a5b2f421d8b.tar.bz2 linux-87fe1adb66a514fa3abbe8bdb4278a5b2f421d8b.zip |
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 'include/linux/security.h')
-rw-r--r-- | include/linux/security.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index 4d0baf30266e..1bc362cb413f 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -416,6 +416,7 @@ int security_task_fix_setuid(struct cred *new, const struct cred *old, int flags); int security_task_fix_setgid(struct cred *new, const struct cred *old, int flags); +int security_task_fix_setgroups(struct cred *new, const struct cred *old); int security_task_setpgid(struct task_struct *p, pid_t pgid); int security_task_getpgid(struct task_struct *p); int security_task_getsid(struct task_struct *p); @@ -1100,6 +1101,12 @@ static inline int security_task_fix_setgid(struct cred *new, return 0; } +static inline int security_task_fix_setgroups(struct cred *new, + const struct cred *old) +{ + return 0; +} + static inline int security_task_setpgid(struct task_struct *p, pid_t pgid) { return 0; |