mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
security: Add LSM hook to setgroups() syscall
Give the LSM framework the ability to filter setgroups() syscalls. There are already analagous hooks for the set*uid() and set*gid() syscalls. The SafeSetID LSM will use this new hook to ensure setgroups() calls are allowed by the installed security policy. Tested by putting print statement in security_task_fix_setgroups() hook and confirming that it gets hit when userspace does a setgroups() syscall. Acked-by: Casey Schaufler <casey@schaufler-ca.com> Reviewed-by: Serge Hallyn <serge@hallyn.com> Signed-off-by: Micah Morton <mortonm@chromium.org>
This commit is contained in:
@@ -702,6 +702,13 @@
|
||||
* @old is the set of credentials that are being replaced.
|
||||
* @flags contains one of the LSM_SETID_* values.
|
||||
* Return 0 on success.
|
||||
* @task_fix_setgroups:
|
||||
* Update the module's state after setting the supplementary group
|
||||
* identity attributes of the current process.
|
||||
* @new is the set of credentials that will be installed. Modifications
|
||||
* should be made to this rather than to @current->cred.
|
||||
* @old is the set of credentials that are being replaced.
|
||||
* Return 0 on success.
|
||||
* @task_setpgid:
|
||||
* Check permission before setting the process group identifier of the
|
||||
* process @p to @pgid.
|
||||
|
Reference in New Issue
Block a user