aboutsummaryrefslogtreecommitdiffstats
path: root/security/security.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/security.c')
-rw-r--r--security/security.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/security/security.c b/security/security.c
index 94b35aef6871..94048028bdd1 100644
--- a/security/security.c
+++ b/security/security.c
@@ -1342,22 +1342,17 @@ int security_xfrm_policy_delete(struct xfrm_sec_ctx *ctx)
1342 return security_ops->xfrm_policy_delete_security(ctx); 1342 return security_ops->xfrm_policy_delete_security(ctx);
1343} 1343}
1344 1344
1345int security_xfrm_state_alloc(struct xfrm_state *x, struct xfrm_user_sec_ctx *sec_ctx) 1345int security_xfrm_state_alloc(struct xfrm_state *x,
1346 struct xfrm_user_sec_ctx *sec_ctx)
1346{ 1347{
1347 return security_ops->xfrm_state_alloc_security(x, sec_ctx, 0); 1348 return security_ops->xfrm_state_alloc(x, sec_ctx);
1348} 1349}
1349EXPORT_SYMBOL(security_xfrm_state_alloc); 1350EXPORT_SYMBOL(security_xfrm_state_alloc);
1350 1351
1351int security_xfrm_state_alloc_acquire(struct xfrm_state *x, 1352int security_xfrm_state_alloc_acquire(struct xfrm_state *x,
1352 struct xfrm_sec_ctx *polsec, u32 secid) 1353 struct xfrm_sec_ctx *polsec, u32 secid)
1353{ 1354{
1354 if (!polsec) 1355 return security_ops->xfrm_state_alloc_acquire(x, polsec, secid);
1355 return 0;
1356 /*
1357 * We want the context to be taken from secid which is usually
1358 * from the sock.
1359 */
1360 return security_ops->xfrm_state_alloc_security(x, NULL, secid);
1361} 1356}
1362 1357
1363int security_xfrm_state_delete(struct xfrm_state *x) 1358int security_xfrm_state_delete(struct xfrm_state *x)