diff options
Diffstat (limited to 'security/commoncap.c')
| -rw-r--r-- | security/commoncap.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index 232db019f051..52e04136bfa8 100644 --- a/security/commoncap.c +++ b/security/commoncap.c | |||
| @@ -1362,10 +1362,17 @@ struct security_hook_list capability_hooks[] __lsm_ro_after_init = { | |||
| 1362 | LSM_HOOK_INIT(vm_enough_memory, cap_vm_enough_memory), | 1362 | LSM_HOOK_INIT(vm_enough_memory, cap_vm_enough_memory), |
| 1363 | }; | 1363 | }; |
| 1364 | 1364 | ||
| 1365 | void __init capability_add_hooks(void) | 1365 | static int __init capability_init(void) |
| 1366 | { | 1366 | { |
| 1367 | security_add_hooks(capability_hooks, ARRAY_SIZE(capability_hooks), | 1367 | security_add_hooks(capability_hooks, ARRAY_SIZE(capability_hooks), |
| 1368 | "capability"); | 1368 | "capability"); |
| 1369 | return 0; | ||
| 1369 | } | 1370 | } |
| 1370 | 1371 | ||
| 1372 | DEFINE_LSM(capability) = { | ||
| 1373 | .name = "capability", | ||
| 1374 | .order = LSM_ORDER_FIRST, | ||
| 1375 | .init = capability_init, | ||
| 1376 | }; | ||
| 1377 | |||
| 1371 | #endif /* CONFIG_SECURITY */ | 1378 | #endif /* CONFIG_SECURITY */ |
