]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - security/security.c
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, 15 Feb 2021 07:26:00 +0000 (08:26 +0100)
commit3ddd29319c05fc393fd6d995a985610adbaa19fb
treed3453a52b25cd3e1240579b5aee410f5118435e4
parentbba9ce31713b5c52bcd0cf9a5b6428ae167c7e27
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