selinux: Set socket NetLabel based on connection endpoint
authorPaul Moore <paul.moore@hp.com>
Fri, 10 Oct 2008 14:16:33 +0000 (10:16 -0400)
committerPaul Moore <paul.moore@hp.com>
Fri, 10 Oct 2008 14:16:33 +0000 (10:16 -0400)
commit014ab19a69c325f52d7bae54ceeda73d6307ae0c
tree8a69c490accb7d5454bdfeb8c078d846729aeb60
parent948bf85c1bc9a84754786a9d5dd99b7ecc46451e
selinux: Set socket NetLabel based on connection endpoint

Previous work enabled the use of address based NetLabel selectors, which while
highly useful, brought the potential for additional per-packet overhead when
used.  This patch attempts to solve that by applying NetLabel socket labels
when sockets are connect()'d.  This should alleviate the per-packet NetLabel
labeling for all connected sockets (yes, it even works for connected DGRAM
sockets).

Signed-off-by: Paul Moore <paul.moore@hp.com>
Reviewed-by: James Morris <jmorris@namei.org>
include/net/cipso_ipv4.h
include/net/netlabel.h
net/ipv4/cipso_ipv4.c
net/netlabel/netlabel_kapi.c
security/selinux/hooks.c
security/selinux/include/netlabel.h
security/selinux/include/objsec.h
security/selinux/netlabel.c