BACKPORT: Smack: secmark support for netfilter
authorCasey Schaufler <casey@schaufler-ca.com>
Sat, 13 Dec 2014 01:08:40 +0000 (17:08 -0800)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 30 Jun 2016 12:57:44 +0000 (14:57 +0200)
commit9804319ea071c337035b2086b4e782b62fbe2fe9
treecf3335a7bc930ad1e6658fa8b93bbaf3fea3739f
parent6db568822e1216ccb31a321fdcd0d1653b909df2
BACKPORT: Smack: secmark support for netfilter

Smack uses CIPSO to label internet packets and thus provide
for access control on delivery of packets. The netfilter facility
was not used to allow for Smack to work properly without netfilter
configuration. Smack does not need netfilter, however there are
cases where it would be handy.

As a side effect, the labeling of local IPv4 packets can be optimized
and the handling of local IPv6 packets is just all out better.

The best part is that the netfilter tools use "contexts" that
are just strings, and they work just as well for Smack as they
do for SELinux.

All of the conditional compilation for IPv6 was implemented
by Rafal Krypa <r.krypa@samsung.com>

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
(cherry-picked from upstream 69f287ae6fc8357e0bc561353a2d585b89ee8cdc)
security/smack/Kconfig
security/smack/Makefile
security/smack/smack.h
security/smack/smack_lsm.c
security/smack/smack_netfilter.c [new file with mode: 0644]