selinux: fix 2.6.20-rc6 build when no xfrm
Subsystems (3)
PATCH 1/1 selinux: fix 2.6.20-rc6 build when no xfrm
This patch is an incremental fix to the flow_cache_genid patch for selinux that breaks the build of 2.6.20-rc6 when xfrm is not configured.
Signed-off-by Venkat Yekkirala <[email protected]>
--- security/selinux/include/xfrm.h | 9 +++++++++ security/selinux/ss/services.c | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-)
security/selinux/include/xfrm.h +9 -0
@@ -37,6 +37,11 @@ int selinux_xfrm_sock_rcv_skb(u32 sid, sint selinux_xfrm_postroute_last (u32 isec_sid,struct sk_buff *skb,struct avc_audit_data *ad,u8 proto);int selinux_xfrm_decode_session (struct sk_buff *skb,u32 *sid,int ckall); + +static inline void selinux_xfrm_notify_policyload (void ) +{ +atomic_inc (&flow_cache_genid); +}#else static inline int selinux_xfrm_sock_rcv_skb (u32 isec_sid,struct sk_buff *skb,struct avc_audit_data *ad)
@@ -55,6 +60,10 @@ static inline int selinux_xfrm_decode_se *sid =SECSID_NULL ; return 0; } + +static inline void selinux_xfrm_notify_policyload (void ) +{ +}#endif static inline void selinux_skb_xfrm_sid (struct sk_buff *skb,u32 *sid)
security/selinux/ss/services.c +3 -3
@@ -1299,7 +1299,7 @@ int security_load_policy(void *data, sizavc_ss_reset (seqno);selnl_notify_policyload (seqno);selinux_netlbl_cache_invalidate (); -atomic_inc (&flow_cache_genid); +selinux_xfrm_notify_policyload ();return 0 ; }
@@ -1355,7 +1355,7 @@ #endifavc_ss_reset (seqno);selnl_notify_policyload (seqno);selinux_netlbl_cache_invalidate (); -atomic_inc (&flow_cache_genid); +selinux_xfrm_notify_policyload ();return 0 ;
@@ -1855,7 +1855,7 @@ out:if (!rc) {avc_ss_reset (seqno);selnl_notify_policyload (seqno); -atomic_inc (&flow_cache_genid); +selinux_xfrm_notify_policyload (); }return rc; }
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
From: Venkat Yekkirala <[email protected]>
Date: Fri, 26 Jan 2007 10:58:03 -0600
Quoted 5 lines
This patch is an incremental fix to the
flow_cache_genidpatch for selinux that breaks the build of 2.6.20-rc6 when xfrm is not configured.Signed-off-by Venkat Yekkirala <[email protected]>
Applied, thanks for taking care of this.