aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorVenkat Yekkirala <vyekkirala@TrustedCS.com>2006-08-05 02:12:42 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 17:53:27 -0400
commitbeb8d13bed80f8388f1a9a107d07ddd342e627e8 (patch)
tree19d5763b9b3b8ff3969997565e5ec0edd6e4bd33 /security/selinux/hooks.c
parent4e2ba18eae7f370c7c3ed96eaca747cc9b39f917 (diff)
[MLSXFRM]: Add flow labeling
This labels the flows that could utilize IPSec xfrms at the points the flows are defined so that IPSec policy and SAs at the right label can be used. The following protos are currently not handled, but they should continue to be able to use single-labeled IPSec like they currently do. ipmr ip_gre ipip igmp sit sctp ip6_tunnel (IPv6 over IPv6 tunnel device) decnet Signed-off-by: Venkat Yekkirala <vyekkirala@TrustedCS.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 5c189da07bc9..4e5989d584ce 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -3561,14 +3561,14 @@ static void selinux_sk_clone_security(const struct sock *sk, struct sock *newsk)
3561 newssec->peer_sid = ssec->peer_sid; 3561 newssec->peer_sid = ssec->peer_sid;
3562} 3562}
3563 3563
3564static unsigned int selinux_sk_getsid_security(struct sock *sk, struct flowi *fl, u8 dir) 3564static void selinux_sk_getsecid(struct sock *sk, u32 *secid)
3565{ 3565{
3566 if (!sk) 3566 if (!sk)
3567 return selinux_no_sk_sid(fl); 3567 *secid = SECINITSID_ANY_SOCKET;
3568 else { 3568 else {
3569 struct sk_security_struct *sksec = sk->sk_security; 3569 struct sk_security_struct *sksec = sk->sk_security;
3570 3570
3571 return sksec->sid; 3571 *secid = sksec->sid;
3572 } 3572 }
3573} 3573}
3574 3574
@@ -4622,7 +4622,7 @@ static struct security_operations selinux_ops = {
4622 .sk_alloc_security = selinux_sk_alloc_security, 4622 .sk_alloc_security = selinux_sk_alloc_security,
4623 .sk_free_security = selinux_sk_free_security, 4623 .sk_free_security = selinux_sk_free_security,
4624 .sk_clone_security = selinux_sk_clone_security, 4624 .sk_clone_security = selinux_sk_clone_security,
4625 .sk_getsid = selinux_sk_getsid_security, 4625 .sk_getsecid = selinux_sk_getsecid,
4626 4626
4627#ifdef CONFIG_SECURITY_NETWORK_XFRM 4627#ifdef CONFIG_SECURITY_NETWORK_XFRM
4628 .xfrm_policy_alloc_security = selinux_xfrm_policy_alloc, 4628 .xfrm_policy_alloc_security = selinux_xfrm_policy_alloc,