diff options
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r-- | include/net/xfrm.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 639dd1316d37..6f0ba01afe73 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -263,7 +263,7 @@ struct km_event { | |||
263 | } data; | 263 | } data; |
264 | 264 | ||
265 | u32 seq; | 265 | u32 seq; |
266 | u32 pid; | 266 | u32 portid; |
267 | u32 event; | 267 | u32 event; |
268 | struct net *net; | 268 | struct net *net; |
269 | }; | 269 | }; |
@@ -313,7 +313,7 @@ extern void km_state_notify(struct xfrm_state *x, const struct km_event *c); | |||
313 | 313 | ||
314 | struct xfrm_tmpl; | 314 | struct xfrm_tmpl; |
315 | extern int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol); | 315 | extern int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol); |
316 | extern void km_state_expired(struct xfrm_state *x, int hard, u32 pid); | 316 | extern void km_state_expired(struct xfrm_state *x, int hard, u32 portid); |
317 | extern int __xfrm_state_delete(struct xfrm_state *x); | 317 | extern int __xfrm_state_delete(struct xfrm_state *x); |
318 | 318 | ||
319 | struct xfrm_state_afinfo { | 319 | struct xfrm_state_afinfo { |
@@ -576,7 +576,7 @@ struct xfrm_mgr { | |||
576 | struct list_head list; | 576 | struct list_head list; |
577 | char *id; | 577 | char *id; |
578 | int (*notify)(struct xfrm_state *x, const struct km_event *c); | 578 | int (*notify)(struct xfrm_state *x, const struct km_event *c); |
579 | int (*acquire)(struct xfrm_state *x, struct xfrm_tmpl *, struct xfrm_policy *xp, int dir); | 579 | int (*acquire)(struct xfrm_state *x, struct xfrm_tmpl *, struct xfrm_policy *xp); |
580 | struct xfrm_policy *(*compile_policy)(struct sock *sk, int opt, u8 *data, int len, int *dir); | 580 | struct xfrm_policy *(*compile_policy)(struct sock *sk, int opt, u8 *data, int len, int *dir); |
581 | int (*new_mapping)(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); | 581 | int (*new_mapping)(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); |
582 | int (*notify_policy)(struct xfrm_policy *x, int dir, const struct km_event *c); | 582 | int (*notify_policy)(struct xfrm_policy *x, int dir, const struct km_event *c); |
@@ -671,7 +671,7 @@ struct xfrm_spi_skb_cb { | |||
671 | /* Audit Information */ | 671 | /* Audit Information */ |
672 | struct xfrm_audit { | 672 | struct xfrm_audit { |
673 | u32 secid; | 673 | u32 secid; |
674 | uid_t loginuid; | 674 | kuid_t loginuid; |
675 | u32 sessionid; | 675 | u32 sessionid; |
676 | }; | 676 | }; |
677 | 677 | ||
@@ -690,13 +690,14 @@ static inline struct audit_buffer *xfrm_audit_start(const char *op) | |||
690 | return audit_buf; | 690 | return audit_buf; |
691 | } | 691 | } |
692 | 692 | ||
693 | static inline void xfrm_audit_helper_usrinfo(uid_t auid, u32 ses, u32 secid, | 693 | static inline void xfrm_audit_helper_usrinfo(kuid_t auid, u32 ses, u32 secid, |
694 | struct audit_buffer *audit_buf) | 694 | struct audit_buffer *audit_buf) |
695 | { | 695 | { |
696 | char *secctx; | 696 | char *secctx; |
697 | u32 secctx_len; | 697 | u32 secctx_len; |
698 | 698 | ||
699 | audit_log_format(audit_buf, " auid=%u ses=%u", auid, ses); | 699 | audit_log_format(audit_buf, " auid=%u ses=%u", |
700 | from_kuid(&init_user_ns, auid), ses); | ||
700 | if (secid != 0 && | 701 | if (secid != 0 && |
701 | security_secid_to_secctx(secid, &secctx, &secctx_len) == 0) { | 702 | security_secid_to_secctx(secid, &secctx, &secctx_len) == 0) { |
702 | audit_log_format(audit_buf, " subj=%s", secctx); | 703 | audit_log_format(audit_buf, " subj=%s", secctx); |
@@ -706,13 +707,13 @@ static inline void xfrm_audit_helper_usrinfo(uid_t auid, u32 ses, u32 secid, | |||
706 | } | 707 | } |
707 | 708 | ||
708 | extern void xfrm_audit_policy_add(struct xfrm_policy *xp, int result, | 709 | extern void xfrm_audit_policy_add(struct xfrm_policy *xp, int result, |
709 | u32 auid, u32 ses, u32 secid); | 710 | kuid_t auid, u32 ses, u32 secid); |
710 | extern void xfrm_audit_policy_delete(struct xfrm_policy *xp, int result, | 711 | extern void xfrm_audit_policy_delete(struct xfrm_policy *xp, int result, |
711 | u32 auid, u32 ses, u32 secid); | 712 | kuid_t auid, u32 ses, u32 secid); |
712 | extern void xfrm_audit_state_add(struct xfrm_state *x, int result, | 713 | extern void xfrm_audit_state_add(struct xfrm_state *x, int result, |
713 | u32 auid, u32 ses, u32 secid); | 714 | kuid_t auid, u32 ses, u32 secid); |
714 | extern void xfrm_audit_state_delete(struct xfrm_state *x, int result, | 715 | extern void xfrm_audit_state_delete(struct xfrm_state *x, int result, |
715 | u32 auid, u32 ses, u32 secid); | 716 | kuid_t auid, u32 ses, u32 secid); |
716 | extern void xfrm_audit_state_replay_overflow(struct xfrm_state *x, | 717 | extern void xfrm_audit_state_replay_overflow(struct xfrm_state *x, |
717 | struct sk_buff *skb); | 718 | struct sk_buff *skb); |
718 | extern void xfrm_audit_state_replay(struct xfrm_state *x, | 719 | extern void xfrm_audit_state_replay(struct xfrm_state *x, |
@@ -725,22 +726,22 @@ extern void xfrm_audit_state_icvfail(struct xfrm_state *x, | |||
725 | #else | 726 | #else |
726 | 727 | ||
727 | static inline void xfrm_audit_policy_add(struct xfrm_policy *xp, int result, | 728 | static inline void xfrm_audit_policy_add(struct xfrm_policy *xp, int result, |
728 | u32 auid, u32 ses, u32 secid) | 729 | kuid_t auid, u32 ses, u32 secid) |
729 | { | 730 | { |
730 | } | 731 | } |
731 | 732 | ||
732 | static inline void xfrm_audit_policy_delete(struct xfrm_policy *xp, int result, | 733 | static inline void xfrm_audit_policy_delete(struct xfrm_policy *xp, int result, |
733 | u32 auid, u32 ses, u32 secid) | 734 | kuid_t auid, u32 ses, u32 secid) |
734 | { | 735 | { |
735 | } | 736 | } |
736 | 737 | ||
737 | static inline void xfrm_audit_state_add(struct xfrm_state *x, int result, | 738 | static inline void xfrm_audit_state_add(struct xfrm_state *x, int result, |
738 | u32 auid, u32 ses, u32 secid) | 739 | kuid_t auid, u32 ses, u32 secid) |
739 | { | 740 | { |
740 | } | 741 | } |
741 | 742 | ||
742 | static inline void xfrm_audit_state_delete(struct xfrm_state *x, int result, | 743 | static inline void xfrm_audit_state_delete(struct xfrm_state *x, int result, |
743 | u32 auid, u32 ses, u32 secid) | 744 | kuid_t auid, u32 ses, u32 secid) |
744 | { | 745 | { |
745 | } | 746 | } |
746 | 747 | ||
@@ -1557,7 +1558,7 @@ extern int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, | |||
1557 | #endif | 1558 | #endif |
1558 | 1559 | ||
1559 | extern int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); | 1560 | extern int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); |
1560 | extern void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid); | 1561 | extern void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 portid); |
1561 | extern int km_report(struct net *net, u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr); | 1562 | extern int km_report(struct net *net, u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr); |
1562 | 1563 | ||
1563 | extern void xfrm_input_init(void); | 1564 | extern void xfrm_input_init(void); |