scripts/selinux,selinux: update mdp to enable policy capabilities
authorStephen Smalley <stephen.smalley.work@gmail.com>
Thu, 6 Aug 2020 18:34:18 +0000 (14:34 -0400)
committerPaul Moore <paul@paul-moore.com>
Tue, 18 Aug 2020 00:42:00 +0000 (20:42 -0400)
commit339949be25863ac15e24659c2ab4b01185e1234a
treede4c7230a954ad27655ba2a8118877eb9c051f63
parent9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
scripts/selinux,selinux: update mdp to enable policy capabilities

Presently mdp does not enable any SELinux policy capabilities
in the dummy policy it generates. Thus, policies derived from
it will by default lack various features commonly used in modern
policies such as open permission, extended socket classes, network
peer controls, etc.  Split the policy capability definitions out into
their own headers so that we can include them into mdp without pulling in
other kernel headers and extend mdp generate policycap statements for the
policy capabilities known to the kernel.  Policy authors may wish to
selectively remove some of these from the generated policy.

Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
scripts/selinux/mdp/mdp.c
security/selinux/include/policycap.h [new file with mode: 0644]
security/selinux/include/policycap_names.h [new file with mode: 0644]
security/selinux/include/security.h
security/selinux/ss/services.c