diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2008-07-03 14:56:05 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-07-14 01:03:04 -0400 |
commit | 5915eb53861c5776cfec33ca4fcc1fd20d66dd27 (patch) | |
tree | d4895b96dfdc227a3abe2f13c093b6f53ac3aef8 /security/security.c | |
parent | b478a9f9889c81e88077d1495daadee64c0af541 (diff) |
security: remove dummy module
Remove the dummy module and make the "capability" module the default.
Compile and boot tested.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/security.c')
-rw-r--r-- | security/security.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/security/security.c b/security/security.c index 28b2860c1129..30b0278de394 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -20,8 +20,8 @@ | |||
20 | /* Boot-time LSM user choice */ | 20 | /* Boot-time LSM user choice */ |
21 | static __initdata char chosen_lsm[SECURITY_NAME_MAX + 1]; | 21 | static __initdata char chosen_lsm[SECURITY_NAME_MAX + 1]; |
22 | 22 | ||
23 | /* things that live in dummy.c */ | 23 | /* things that live in capability.c */ |
24 | extern struct security_operations dummy_security_ops; | 24 | extern struct security_operations default_security_ops; |
25 | extern void security_fixup_ops(struct security_operations *ops); | 25 | extern void security_fixup_ops(struct security_operations *ops); |
26 | 26 | ||
27 | struct security_operations *security_ops; /* Initialized to NULL */ | 27 | struct security_operations *security_ops; /* Initialized to NULL */ |
@@ -57,13 +57,8 @@ int __init security_init(void) | |||
57 | { | 57 | { |
58 | printk(KERN_INFO "Security Framework initialized\n"); | 58 | printk(KERN_INFO "Security Framework initialized\n"); |
59 | 59 | ||
60 | if (verify(&dummy_security_ops)) { | 60 | security_fixup_ops(&default_security_ops); |
61 | printk(KERN_ERR "%s could not verify " | 61 | security_ops = &default_security_ops; |
62 | "dummy_security_ops structure.\n", __func__); | ||
63 | return -EIO; | ||
64 | } | ||
65 | |||
66 | security_ops = &dummy_security_ops; | ||
67 | do_security_initcalls(); | 62 | do_security_initcalls(); |
68 | 63 | ||
69 | return 0; | 64 | return 0; |
@@ -122,7 +117,7 @@ int register_security(struct security_operations *ops) | |||
122 | return -EINVAL; | 117 | return -EINVAL; |
123 | } | 118 | } |
124 | 119 | ||
125 | if (security_ops != &dummy_security_ops) | 120 | if (security_ops != &default_security_ops) |
126 | return -EAGAIN; | 121 | return -EAGAIN; |
127 | 122 | ||
128 | security_ops = ops; | 123 | security_ops = ops; |