aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorJoy Latten <latten@austin.ibm.com>2006-11-27 14:11:54 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-06 23:14:22 -0500
commit161a09e737f0761ca064ee6a907313402f7a54b6 (patch)
tree80fdf6dc5de73d810ef0ec811299a5ec3c5ce23e /include/net/xfrm.h
parent95b99a670df31ca5271f503f378e5cac3aee8f5e (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.h19
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
393extern unsigned int xfrm_policy_count[XFRM_POLICY_MAX*2]; 393extern unsigned int xfrm_policy_count[XFRM_POLICY_MAX*2];
394 394
395/* Audit Information */
396struct xfrm_audit
397{
398 uid_t loginuid;
399 u32 secid;
400};
401void xfrm_audit_log(uid_t auid, u32 secid, int type, int result,
402 struct xfrm_policy *xp, struct xfrm_state *x);
403
395static inline void xfrm_pol_hold(struct xfrm_policy *policy) 404static 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
907extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq); 916extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq);
908extern int xfrm_state_delete(struct xfrm_state *x); 917extern int xfrm_state_delete(struct xfrm_state *x);
909extern void xfrm_state_flush(u8 proto); 918extern void xfrm_state_flush(u8 proto, struct xfrm_audit *audit_info);
910extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq); 919extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq);
911extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq); 920extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq);
912extern void xfrm_replay_notify(struct xfrm_state *x, int event); 921extern 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);
961struct xfrm_policy *xfrm_policy_byid(u8, int dir, u32 id, int delete); 970struct xfrm_policy *xfrm_policy_byid(u8, int dir, u32 id, int delete);
962void xfrm_policy_flush(u8 type); 971void xfrm_policy_flush(u8 type, struct xfrm_audit *audit_info);
963u32 xfrm_get_acqseq(void); 972u32 xfrm_get_acqseq(void);
964void xfrm_alloc_spi(struct xfrm_state *x, __be32 minspi, __be32 maxspi); 973void xfrm_alloc_spi(struct xfrm_state *x, __be32 minspi, __be32 maxspi);
965struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto, 974struct 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);
968extern void xfrm_policy_flush(u8 type); 977extern void xfrm_policy_flush(u8 type, struct xfrm_audit *audit_info);
969extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); 978extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol);
970extern int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *xdst, 979extern 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);