aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorVenkat Yekkirala <vyekkirala@TrustedCS.com>2006-07-25 02:29:07 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 17:53:24 -0400
commite0d1caa7b0d5f02e4f34aa09c695d04251310c6c (patch)
treebf023c17abf6813f2694ebf5fafff82edd6a1023 /security/selinux/hooks.c
parentb6340fcd761acf9249b3acbc95c4dc555d9beb07 (diff)
[MLSXFRM]: Flow based matching of xfrm policy and state
This implements a seemless mechanism for xfrm policy selection and state matching based on the flow sid. This also includes the necessary SELinux enforcement pieces. 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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index d67abf77584a..5c189da07bc9 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -3468,7 +3468,7 @@ static int selinux_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb)
3468 if (err) 3468 if (err)
3469 goto out; 3469 goto out;
3470 3470
3471 err = selinux_xfrm_sock_rcv_skb(sock_sid, skb); 3471 err = selinux_xfrm_sock_rcv_skb(sock_sid, skb, &ad);
3472out: 3472out:
3473 return err; 3473 return err;
3474} 3474}
@@ -3720,7 +3720,7 @@ static unsigned int selinux_ip_postroute_last(unsigned int hooknum,
3720 if (err) 3720 if (err)
3721 goto out; 3721 goto out;
3722 3722
3723 err = selinux_xfrm_postroute_last(isec->sid, skb); 3723 err = selinux_xfrm_postroute_last(isec->sid, skb, &ad);
3724out: 3724out:
3725 return err ? NF_DROP : NF_ACCEPT; 3725 return err ? NF_DROP : NF_ACCEPT;
3726} 3726}
@@ -4633,6 +4633,9 @@ static struct security_operations selinux_ops = {
4633 .xfrm_state_free_security = selinux_xfrm_state_free, 4633 .xfrm_state_free_security = selinux_xfrm_state_free,
4634 .xfrm_state_delete_security = selinux_xfrm_state_delete, 4634 .xfrm_state_delete_security = selinux_xfrm_state_delete,
4635 .xfrm_policy_lookup = selinux_xfrm_policy_lookup, 4635 .xfrm_policy_lookup = selinux_xfrm_policy_lookup,
4636 .xfrm_state_pol_flow_match = selinux_xfrm_state_pol_flow_match,
4637 .xfrm_flow_state_match = selinux_xfrm_flow_state_match,
4638 .xfrm_decode_session = selinux_xfrm_decode_session,
4636#endif 4639#endif
4637 4640
4638#ifdef CONFIG_KEYS 4641#ifdef CONFIG_KEYS