Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34402
b: refs/heads/master
c: a51c64f
h: refs/heads/master
v: v3
  • Loading branch information
Venkat Yekkirala authored and David S. Miller committed Sep 22, 2006
1 parent e1f9696 commit 95153a0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 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: 4237c75c0a35535d7f9f2bfeeb4b4df1e068a0bf
refs/heads/master: a51c64f1e5c2876eab2a32955acd9e8015c91c15
5 changes: 5 additions & 0 deletions trunk/security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -3591,6 +3591,11 @@ int selinux_inet_conn_request(struct sock *sk, struct sk_buff *skb,
err = selinux_xfrm_decode_session(skb, &peersid, 0);
BUG_ON(err);

if (peersid == SECSID_NULL) {
req->secid = sksec->sid;
return 0;
}

err = security_sid_mls_copy(sksec->sid, peersid, &newsid);
if (err)
return err;
Expand Down
7 changes: 6 additions & 1 deletion trunk/security/selinux/include/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ int selinux_xfrm_policy_lookup(struct xfrm_policy *xp, u32 fl_secid, u8 dir);
int selinux_xfrm_state_pol_flow_match(struct xfrm_state *x,
struct xfrm_policy *xp, struct flowi *fl);
int selinux_xfrm_flow_state_match(struct flowi *fl, struct xfrm_state *xfrm);
int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *fl, int ckall);


/*
Expand All @@ -41,6 +40,7 @@ int selinux_xfrm_postroute_last(u32 isec_sid, struct sk_buff *skb,
struct avc_audit_data *ad);
u32 selinux_socket_getpeer_stream(struct sock *sk);
u32 selinux_socket_getpeer_dgram(struct sk_buff *skb);
int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall);
#else
static inline int selinux_xfrm_sock_rcv_skb(u32 isec_sid, struct sk_buff *skb,
struct avc_audit_data *ad)
Expand All @@ -63,6 +63,11 @@ static inline int selinux_socket_getpeer_dgram(struct sk_buff *skb)
{
return SECSID_NULL;
}
static inline int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall)
{
*sid = SECSID_NULL;
return 0;
}
#endif

#endif /* _SELINUX_XFRM_H_ */

0 comments on commit 95153a0

Please sign in to comment.