]> git.proxmox.com Git - mirror_ubuntu-impish-kernel.git/commit
UBUNTU: SAUCE: LSM: Specify which LSM to display
authorCasey Schaufler <casey@schaufler-ca.com>
Thu, 20 Aug 2020 17:40:08 +0000 (10:40 -0700)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 28 Jun 2021 06:03:55 +0000 (08:03 +0200)
commit5dfd017c11a734a4c4d0bc864d29bfc5f70f6214
treeeaa27b395c6e6760170af7342e4cf7b548d16a26
parent602a2d4a080c24052d0bf2599eac51d45e214e84
UBUNTU: SAUCE: LSM: Specify which LSM to display

Create a new entry "display" in the procfs attr directory for
controlling which LSM security information is displayed for a
process. A process can only read or write its own display value.

The name of an active LSM that supplies hooks for
human readable data may be written to "display" to set the
value. The name of the LSM currently in use can be read from
"display". At this point there can only be one LSM capable
of display active. A helper function lsm_task_display() is
provided to get the display slot for a task_struct.

Setting the "display" requires that all security modules using
setprocattr hooks allow the action. Each security module is
responsible for defining its policy.

AppArmor hook provided by John Johansen <john.johansen@canonical.com>
SELinux hook provided by Stephen Smalley <sds@tycho.nsa.gov>

Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
fs/proc/base.c
include/linux/lsm_hooks.h
security/apparmor/include/apparmor.h
security/apparmor/lsm.c
security/security.c
security/selinux/hooks.c
security/selinux/include/classmap.h
security/smack/smack_lsm.c