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