Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80884
b: refs/heads/master
c: e8bfdb9
h: refs/heads/master
v: v3
  • Loading branch information
Paul Moore authored and James Morris committed Jan 29, 2008
1 parent c0aa458 commit 58cdbb9
Show file tree
Hide file tree
Showing 7 changed files with 156 additions and 126 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 75e22910cf0c26802b09dac2e34c13e648d3ed02
refs/heads/master: e8bfdb9d0dfc1231a6a71e849dfbd4447acdfff6
4 changes: 2 additions & 2 deletions trunk/security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -3853,7 +3853,7 @@ static int selinux_sock_rcv_skb_compat(struct sock *sk, struct sk_buff *skb,
if (!skb->dev)
goto out;

err = sel_netif_sids(skb->dev, &if_sid, NULL);
err = sel_netif_sid(skb->iif, &if_sid);
if (err)
goto out;

Expand Down Expand Up @@ -4178,7 +4178,7 @@ static int selinux_ip_postroute_last_compat(struct sock *sk, struct net_device *

isec = inode->i_security;

err = sel_netif_sids(dev, &if_sid, NULL);
err = sel_netif_sid(dev->ifindex, &if_sid);
if (err)
goto out;

Expand Down
4 changes: 3 additions & 1 deletion trunk/security/selinux/include/netif.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* Author: James Morris <jmorris@redhat.com>
*
* Copyright (C) 2003 Red Hat, Inc., James Morris <jmorris@redhat.com>
* Copyright (C) 2007 Hewlett-Packard Development Company, L.P.
* Paul Moore, <paul.moore@hp.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
Expand All @@ -15,7 +17,7 @@
#ifndef _SELINUX_NETIF_H_
#define _SELINUX_NETIF_H_

int sel_netif_sids(struct net_device *dev, u32 *if_sid, u32 *msg_sid);
int sel_netif_sid(int ifindex, u32 *sid);

#endif /* _SELINUX_NETIF_H_ */

5 changes: 2 additions & 3 deletions trunk/security/selinux/include/objsec.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ struct bprm_security_struct {
};

struct netif_security_struct {
struct net_device *dev; /* back pointer */
u32 if_sid; /* SID for this interface */
u32 msg_sid; /* default SID for messages received on this interface */
int ifindex; /* device index */
u32 sid; /* SID for this interface */
};

struct sk_security_struct {
Expand Down
3 changes: 1 addition & 2 deletions trunk/security/selinux/include/security.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ int security_get_user_sids(u32 callsid, char *username,
int security_port_sid(u16 domain, u16 type, u8 protocol, u16 port,
u32 *out_sid);

int security_netif_sid(char *name, u32 *if_sid,
u32 *msg_sid);
int security_netif_sid(char *name, u32 *if_sid);

int security_node_sid(u16 domain, void *addr, u32 addrlen,
u32 *out_sid);
Expand Down
Loading

0 comments on commit 58cdbb9

Please sign in to comment.