aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2013-11-27 17:35:17 -0500
committerEric Paris <eparis@redhat.com>2014-01-13 22:31:46 -0500
commit4440e8548153e9e6d56db9abe6f3bc0e5b9eb74f (patch)
tree1752c5edd77a746fdb2aad2806b31fbe4dd39a76 /net/xfrm
parentff235f51a138fc61e1a22dcb8b072d9c78c2a8cc (diff)
audit: convert all sessionid declaration to unsigned int
Right now the sessionid value in the kernel is a combination of u32, int, and unsigned int. Just use unsigned int throughout. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_policy.c8
-rw-r--r--net/xfrm/xfrm_state.c6
-rw-r--r--net/xfrm/xfrm_user.c12
3 files changed, 13 insertions, 13 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 76e1873811d4..767c74a91db3 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -2899,12 +2899,12 @@ static void xfrm_policy_fini(struct net *net)
2899 flush_work(&net->xfrm.policy_hash_work); 2899 flush_work(&net->xfrm.policy_hash_work);
2900#ifdef CONFIG_XFRM_SUB_POLICY 2900#ifdef CONFIG_XFRM_SUB_POLICY
2901 audit_info.loginuid = INVALID_UID; 2901 audit_info.loginuid = INVALID_UID;
2902 audit_info.sessionid = -1; 2902 audit_info.sessionid = (unsigned int)-1;
2903 audit_info.secid = 0; 2903 audit_info.secid = 0;
2904 xfrm_policy_flush(net, XFRM_POLICY_TYPE_SUB, &audit_info); 2904 xfrm_policy_flush(net, XFRM_POLICY_TYPE_SUB, &audit_info);
2905#endif 2905#endif
2906 audit_info.loginuid = INVALID_UID; 2906 audit_info.loginuid = INVALID_UID;
2907 audit_info.sessionid = -1; 2907 audit_info.sessionid = (unsigned int)-1;
2908 audit_info.secid = 0; 2908 audit_info.secid = 0;
2909 xfrm_policy_flush(net, XFRM_POLICY_TYPE_MAIN, &audit_info); 2909 xfrm_policy_flush(net, XFRM_POLICY_TYPE_MAIN, &audit_info);
2910 2910
@@ -3010,7 +3010,7 @@ static void xfrm_audit_common_policyinfo(struct xfrm_policy *xp,
3010} 3010}
3011 3011
3012void xfrm_audit_policy_add(struct xfrm_policy *xp, int result, 3012void xfrm_audit_policy_add(struct xfrm_policy *xp, int result,
3013 kuid_t auid, u32 sessionid, u32 secid) 3013 kuid_t auid, unsigned int sessionid, u32 secid)
3014{ 3014{
3015 struct audit_buffer *audit_buf; 3015 struct audit_buffer *audit_buf;
3016 3016
@@ -3025,7 +3025,7 @@ void xfrm_audit_policy_add(struct xfrm_policy *xp, int result,
3025EXPORT_SYMBOL_GPL(xfrm_audit_policy_add); 3025EXPORT_SYMBOL_GPL(xfrm_audit_policy_add);
3026 3026
3027void xfrm_audit_policy_delete(struct xfrm_policy *xp, int result, 3027void xfrm_audit_policy_delete(struct xfrm_policy *xp, int result,
3028 kuid_t auid, u32 sessionid, u32 secid) 3028 kuid_t auid, unsigned int sessionid, u32 secid)
3029{ 3029{
3030 struct audit_buffer *audit_buf; 3030 struct audit_buffer *audit_buf;
3031 3031
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index b9c3f9e943a9..dbf0719df5b0 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -2043,7 +2043,7 @@ void xfrm_state_fini(struct net *net)
2043 2043
2044 flush_work(&net->xfrm.state_hash_work); 2044 flush_work(&net->xfrm.state_hash_work);
2045 audit_info.loginuid = INVALID_UID; 2045 audit_info.loginuid = INVALID_UID;
2046 audit_info.sessionid = -1; 2046 audit_info.sessionid = (unsigned int)-1;
2047 audit_info.secid = 0; 2047 audit_info.secid = 0;
2048 xfrm_state_flush(net, IPSEC_PROTO_ANY, &audit_info); 2048 xfrm_state_flush(net, IPSEC_PROTO_ANY, &audit_info);
2049 flush_work(&net->xfrm.state_gc_work); 2049 flush_work(&net->xfrm.state_gc_work);
@@ -2109,7 +2109,7 @@ static void xfrm_audit_helper_pktinfo(struct sk_buff *skb, u16 family,
2109} 2109}
2110 2110
2111void xfrm_audit_state_add(struct xfrm_state *x, int result, 2111void xfrm_audit_state_add(struct xfrm_state *x, int result,
2112 kuid_t auid, u32 sessionid, u32 secid) 2112 kuid_t auid, unsigned int sessionid, u32 secid)
2113{ 2113{
2114 struct audit_buffer *audit_buf; 2114 struct audit_buffer *audit_buf;
2115 2115
@@ -2124,7 +2124,7 @@ void xfrm_audit_state_add(struct xfrm_state *x, int result,
2124EXPORT_SYMBOL_GPL(xfrm_audit_state_add); 2124EXPORT_SYMBOL_GPL(xfrm_audit_state_add);
2125 2125
2126void xfrm_audit_state_delete(struct xfrm_state *x, int result, 2126void xfrm_audit_state_delete(struct xfrm_state *x, int result,
2127 kuid_t auid, u32 sessionid, u32 secid) 2127 kuid_t auid, unsigned int sessionid, u32 secid)
2128{ 2128{
2129 struct audit_buffer *audit_buf; 2129 struct audit_buffer *audit_buf;
2130 2130
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index f964d4c00ffb..ec97e13743e6 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -600,7 +600,7 @@ static int xfrm_add_sa(struct sk_buff *skb, struct nlmsghdr *nlh,
600 int err; 600 int err;
601 struct km_event c; 601 struct km_event c;
602 kuid_t loginuid = audit_get_loginuid(current); 602 kuid_t loginuid = audit_get_loginuid(current);
603 u32 sessionid = audit_get_sessionid(current); 603 unsigned int sessionid = audit_get_sessionid(current);
604 u32 sid; 604 u32 sid;
605 605
606 err = verify_newsa_info(p, attrs); 606 err = verify_newsa_info(p, attrs);
@@ -679,7 +679,7 @@ static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh,
679 struct km_event c; 679 struct km_event c;
680 struct xfrm_usersa_id *p = nlmsg_data(nlh); 680 struct xfrm_usersa_id *p = nlmsg_data(nlh);
681 kuid_t loginuid = audit_get_loginuid(current); 681 kuid_t loginuid = audit_get_loginuid(current);
682 u32 sessionid = audit_get_sessionid(current); 682 unsigned int sessionid = audit_get_sessionid(current);
683 u32 sid; 683 u32 sid;
684 684
685 x = xfrm_user_state_lookup(net, p, attrs, &err); 685 x = xfrm_user_state_lookup(net, p, attrs, &err);
@@ -1405,7 +1405,7 @@ static int xfrm_add_policy(struct sk_buff *skb, struct nlmsghdr *nlh,
1405 int err; 1405 int err;
1406 int excl; 1406 int excl;
1407 kuid_t loginuid = audit_get_loginuid(current); 1407 kuid_t loginuid = audit_get_loginuid(current);
1408 u32 sessionid = audit_get_sessionid(current); 1408 unsigned int sessionid = audit_get_sessionid(current);
1409 u32 sid; 1409 u32 sid;
1410 1410
1411 err = verify_newpolicy_info(p); 1411 err = verify_newpolicy_info(p);
@@ -1663,7 +1663,7 @@ static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh,
1663 } 1663 }
1664 } else { 1664 } else {
1665 kuid_t loginuid = audit_get_loginuid(current); 1665 kuid_t loginuid = audit_get_loginuid(current);
1666 u32 sessionid = audit_get_sessionid(current); 1666 unsigned int sessionid = audit_get_sessionid(current);
1667 u32 sid; 1667 u32 sid;
1668 1668
1669 security_task_getsecid(current, &sid); 1669 security_task_getsecid(current, &sid);
@@ -1959,7 +1959,7 @@ static int xfrm_add_pol_expire(struct sk_buff *skb, struct nlmsghdr *nlh,
1959 err = 0; 1959 err = 0;
1960 if (up->hard) { 1960 if (up->hard) {
1961 kuid_t loginuid = audit_get_loginuid(current); 1961 kuid_t loginuid = audit_get_loginuid(current);
1962 u32 sessionid = audit_get_sessionid(current); 1962 unsigned int sessionid = audit_get_sessionid(current);
1963 u32 sid; 1963 u32 sid;
1964 1964
1965 security_task_getsecid(current, &sid); 1965 security_task_getsecid(current, &sid);
@@ -2002,7 +2002,7 @@ static int xfrm_add_sa_expire(struct sk_buff *skb, struct nlmsghdr *nlh,
2002 2002
2003 if (ue->hard) { 2003 if (ue->hard) {
2004 kuid_t loginuid = audit_get_loginuid(current); 2004 kuid_t loginuid = audit_get_loginuid(current);
2005 u32 sessionid = audit_get_sessionid(current); 2005 unsigned int sessionid = audit_get_sessionid(current);
2006 u32 sid; 2006 u32 sid;
2007 2007
2008 security_task_getsecid(current, &sid); 2008 security_task_getsecid(current, &sid);