aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorPaul Moore <paul.moore@hp.com>2008-01-29 08:38:08 -0500
committerJames Morris <jmorris@namei.org>2008-01-29 16:17:21 -0500
commite8bfdb9d0dfc1231a6a71e849dfbd4447acdfff6 (patch)
tree0d786c0ad972e43d1128296b8e7ae47275ab3ebd /security/selinux/hooks.c
parent75e22910cf0c26802b09dac2e34c13e648d3ed02 (diff)
SELinux: Convert the netif code to use ifindex values
The current SELinux netif code requires the caller have a valid net_device struct pointer to lookup network interface information. However, we don't always have a valid net_device pointer so convert the netif code to use the ifindex values we always have as part of the sk_buff. This patch also removes the default message SID from the network interface record, it is not being used and therefore is "dead code". Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 5df12072c8d5..be544332214c 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -3853,7 +3853,7 @@ static int selinux_sock_rcv_skb_compat(struct sock *sk, struct sk_buff *skb,
3853 if (!skb->dev) 3853 if (!skb->dev)
3854 goto out; 3854 goto out;
3855 3855
3856 err = sel_netif_sids(skb->dev, &if_sid, NULL); 3856 err = sel_netif_sid(skb->iif, &if_sid);
3857 if (err) 3857 if (err)
3858 goto out; 3858 goto out;
3859 3859
@@ -4178,7 +4178,7 @@ static int selinux_ip_postroute_last_compat(struct sock *sk, struct net_device *
4178 4178
4179 isec = inode->i_security; 4179 isec = inode->i_security;
4180 4180
4181 err = sel_netif_sids(dev, &if_sid, NULL); 4181 err = sel_netif_sid(dev->ifindex, &if_sid);
4182 if (err) 4182 if (err)
4183 goto out; 4183 goto out;
4184 4184