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 a3dce87d1aef..57e25c962968 100644 --- a/security/security.c +++ b/security/security.c | |||
| @@ -1322,22 +1322,17 @@ int security_xfrm_policy_delete(struct xfrm_sec_ctx *ctx) | |||
| 1322 | return security_ops->xfrm_policy_delete_security(ctx); | 1322 | return security_ops->xfrm_policy_delete_security(ctx); |
| 1323 | } | 1323 | } |
| 1324 | 1324 | ||
| 1325 | int security_xfrm_state_alloc(struct xfrm_state *x, struct xfrm_user_sec_ctx *sec_ctx) | 1325 | int security_xfrm_state_alloc(struct xfrm_state *x, |
| 1326 | struct xfrm_user_sec_ctx *sec_ctx) | ||
| 1326 | { | 1327 | { |
| 1327 | return security_ops->xfrm_state_alloc_security(x, sec_ctx, 0); | 1328 | return security_ops->xfrm_state_alloc(x, sec_ctx); |
| 1328 | } | 1329 | } |
| 1329 | EXPORT_SYMBOL(security_xfrm_state_alloc); | 1330 | EXPORT_SYMBOL(security_xfrm_state_alloc); |
| 1330 | 1331 | ||
| 1331 | int security_xfrm_state_alloc_acquire(struct xfrm_state *x, | 1332 | int security_xfrm_state_alloc_acquire(struct xfrm_state *x, |
| 1332 | struct xfrm_sec_ctx *polsec, u32 secid) | 1333 | struct xfrm_sec_ctx *polsec, u32 secid) |
| 1333 | { | 1334 | { |
| 1334 | if (!polsec) | 1335 | return security_ops->xfrm_state_alloc_acquire(x, polsec, secid); |
| 1335 | return 0; | ||
| 1336 | /* | ||
| 1337 | * We want the context to be taken from secid which is usually | ||
| 1338 | * from the sock. | ||
| 1339 | */ | ||
| 1340 | return security_ops->xfrm_state_alloc_security(x, NULL, secid); | ||
| 1341 | } | 1336 | } |
| 1342 | 1337 | ||
| 1343 | int security_xfrm_state_delete(struct xfrm_state *x) | 1338 | int security_xfrm_state_delete(struct xfrm_state *x) |
