]> git.baikalelectronics.ru Git - kernel.git/commit
Smack: unlabeled outgoing ambient packets
authorCasey Schaufler <casey@schaufler-ca.com>
Fri, 15 Feb 2008 23:24:25 +0000 (15:24 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 19 Feb 2008 15:51:00 +0000 (07:51 -0800)
commita1f05c92c3bb792ecfdacf1f085772534b6550be
tree23063e82de8f7b7506d795919d7d4c13725e74a0
parenta3a727d3cea3523930177866c3ee119367ff4fa7
Smack: unlabeled outgoing ambient packets

Smack uses CIPSO labeling, but allows for unlabeled packets by
specifying an "ambient" label that is applied to incoming unlabeled
packets.

Because the other end of the connection may dislike IP options, and ssh
is one know application that behaves thus, it is prudent to respond in
kind.

This patch changes the network labeling behavior such that an outgoing
packet that would be given a CIPSO label that matches the ambient label
is left unlabeled.  An "unlbl" domain is added and the netlabel
defaulting mechanism invoked rather than assuming that everything is
CIPSO.  Locking has been added around changes to the ambient label as
the mechanisms used to do so are more involved.

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Acked-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
security/smack/smack_lsm.c
security/smack/smackfs.c