LSM: SafeSetID: Add GID security policy handling
authorThomas Cedeno <thomascedeno@google.com>
Thu, 16 Jul 2020 19:52:01 +0000 (19:52 +0000)
committerMicah Morton <mortonm@chromium.org>
Tue, 13 Oct 2020 16:17:35 +0000 (09:17 -0700)
commit5294bac97e12bdabbb97e9adf44d388612a700b8
treee43b109a692d9a8a9367555c78b5bdf045834648
parent111767c1d86bd9661f8b72ace50cbcb13507a1bf
LSM: SafeSetID: Add GID security policy handling

The SafeSetID LSM has functionality for restricting setuid() calls based
on its configured security policies. This patch adds the analogous
functionality for setgid() calls. This is mostly a copy-and-paste change
with some code deduplication, plus slight modifications/name changes to
the policy-rule-related structs (now contain GID rules in addition to
the UID ones) and some type generalization since SafeSetID now needs to
deal with kgid_t and kuid_t types.

Signed-off-by: Thomas Cedeno <thomascedeno@google.com>
Signed-off-by: Micah Morton <mortonm@chromium.org>
Documentation/admin-guide/LSM/SafeSetID.rst
security/safesetid/lsm.c
security/safesetid/lsm.h
security/safesetid/securityfs.c