diff options
Diffstat (limited to 'security/security.c')
-rw-r--r-- | security/security.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/security/security.c b/security/security.c index 971092c06f31..edae56b78771 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -23,10 +23,12 @@ static __initdata char chosen_lsm[SECURITY_NAME_MAX + 1] = | |||
23 | CONFIG_DEFAULT_SECURITY; | 23 | CONFIG_DEFAULT_SECURITY; |
24 | 24 | ||
25 | /* things that live in capability.c */ | 25 | /* things that live in capability.c */ |
26 | extern struct security_operations default_security_ops; | ||
27 | extern void security_fixup_ops(struct security_operations *ops); | 26 | extern void security_fixup_ops(struct security_operations *ops); |
28 | 27 | ||
29 | struct security_operations *security_ops; /* Initialized to NULL */ | 28 | static struct security_operations *security_ops; |
29 | static struct security_operations default_security_ops = { | ||
30 | .name = "default", | ||
31 | }; | ||
30 | 32 | ||
31 | static inline int verify(struct security_operations *ops) | 33 | static inline int verify(struct security_operations *ops) |
32 | { | 34 | { |
@@ -63,6 +65,11 @@ int __init security_init(void) | |||
63 | return 0; | 65 | return 0; |
64 | } | 66 | } |
65 | 67 | ||
68 | void reset_security_ops(void) | ||
69 | { | ||
70 | security_ops = &default_security_ops; | ||
71 | } | ||
72 | |||
66 | /* Save user chosen LSM */ | 73 | /* Save user chosen LSM */ |
67 | static int __init choose_lsm(char *str) | 74 | static int __init choose_lsm(char *str) |
68 | { | 75 | { |