diff options
author | Joy Latten <latten@austin.ibm.com> | 2006-11-27 14:11:54 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-06 23:14:22 -0500 |
commit | 161a09e737f0761ca064ee6a907313402f7a54b6 (patch) | |
tree | 80fdf6dc5de73d810ef0ec811299a5ec3c5ce23e /include/net/xfrm.h | |
parent | 95b99a670df31ca5271f503f378e5cac3aee8f5e (diff) |
audit: Add auditing to ipsec
An audit message occurs when an ipsec SA
or ipsec policy is created/deleted.
Signed-off-by: Joy Latten <latten@austin.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r-- | include/net/xfrm.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 15ec19dcf9c8..f699cdcab406 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -392,6 +392,15 @@ extern int xfrm_unregister_km(struct xfrm_mgr *km); | |||
392 | 392 | ||
393 | extern unsigned int xfrm_policy_count[XFRM_POLICY_MAX*2]; | 393 | extern unsigned int xfrm_policy_count[XFRM_POLICY_MAX*2]; |
394 | 394 | ||
395 | /* Audit Information */ | ||
396 | struct xfrm_audit | ||
397 | { | ||
398 | uid_t loginuid; | ||
399 | u32 secid; | ||
400 | }; | ||
401 | void xfrm_audit_log(uid_t auid, u32 secid, int type, int result, | ||
402 | struct xfrm_policy *xp, struct xfrm_state *x); | ||
403 | |||
395 | static inline void xfrm_pol_hold(struct xfrm_policy *policy) | 404 | static inline void xfrm_pol_hold(struct xfrm_policy *policy) |
396 | { | 405 | { |
397 | if (likely(policy != NULL)) | 406 | if (likely(policy != NULL)) |
@@ -906,7 +915,7 @@ static inline int xfrm_state_sort(struct xfrm_state **dst, struct xfrm_state **s | |||
906 | #endif | 915 | #endif |
907 | extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq); | 916 | extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq); |
908 | extern int xfrm_state_delete(struct xfrm_state *x); | 917 | extern int xfrm_state_delete(struct xfrm_state *x); |
909 | extern void xfrm_state_flush(u8 proto); | 918 | extern void xfrm_state_flush(u8 proto, struct xfrm_audit *audit_info); |
910 | extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq); | 919 | extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq); |
911 | extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq); | 920 | extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq); |
912 | extern void xfrm_replay_notify(struct xfrm_state *x, int event); | 921 | extern void xfrm_replay_notify(struct xfrm_state *x, int event); |
@@ -959,13 +968,13 @@ struct xfrm_policy *xfrm_policy_bysel_ctx(u8 type, int dir, | |||
959 | struct xfrm_selector *sel, | 968 | struct xfrm_selector *sel, |
960 | struct xfrm_sec_ctx *ctx, int delete); | 969 | struct xfrm_sec_ctx *ctx, int delete); |
961 | struct xfrm_policy *xfrm_policy_byid(u8, int dir, u32 id, int delete); | 970 | struct xfrm_policy *xfrm_policy_byid(u8, int dir, u32 id, int delete); |
962 | void xfrm_policy_flush(u8 type); | 971 | void xfrm_policy_flush(u8 type, struct xfrm_audit *audit_info); |
963 | u32 xfrm_get_acqseq(void); | 972 | u32 xfrm_get_acqseq(void); |
964 | void xfrm_alloc_spi(struct xfrm_state *x, __be32 minspi, __be32 maxspi); | 973 | void xfrm_alloc_spi(struct xfrm_state *x, __be32 minspi, __be32 maxspi); |
965 | struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto, | 974 | struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto, |
966 | xfrm_address_t *daddr, xfrm_address_t *saddr, | 975 | xfrm_address_t *daddr, xfrm_address_t *saddr, |
967 | int create, unsigned short family); | 976 | int create, unsigned short family); |
968 | extern void xfrm_policy_flush(u8 type); | 977 | extern void xfrm_policy_flush(u8 type, struct xfrm_audit *audit_info); |
969 | extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); | 978 | extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); |
970 | extern int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *xdst, | 979 | extern int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *xdst, |
971 | struct flowi *fl, int family, int strict); | 980 | struct flowi *fl, int family, int strict); |