diff options
Diffstat (limited to 'security/security.c')
-rw-r--r-- | security/security.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/security/security.c b/security/security.c index f693e1f66b98..51ef509710b9 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -174,31 +174,8 @@ int mod_unreg_security(const char *name, struct security_operations *ops) | |||
174 | return security_ops->unregister_security(name, ops); | 174 | return security_ops->unregister_security(name, ops); |
175 | } | 175 | } |
176 | 176 | ||
177 | /** | ||
178 | * capable - calls the currently loaded security module's capable() function with the specified capability | ||
179 | * @cap: the requested capability level. | ||
180 | * | ||
181 | * This function calls the currently loaded security module's capable() | ||
182 | * function with a pointer to the current task and the specified @cap value. | ||
183 | * | ||
184 | * This allows the security module to implement the capable function call | ||
185 | * however it chooses to. | ||
186 | */ | ||
187 | int capable(int cap) | ||
188 | { | ||
189 | if (security_ops->capable(current, cap)) { | ||
190 | /* capability denied */ | ||
191 | return 0; | ||
192 | } | ||
193 | |||
194 | /* capability granted */ | ||
195 | current->flags |= PF_SUPERPRIV; | ||
196 | return 1; | ||
197 | } | ||
198 | |||
199 | EXPORT_SYMBOL_GPL(register_security); | 177 | EXPORT_SYMBOL_GPL(register_security); |
200 | EXPORT_SYMBOL_GPL(unregister_security); | 178 | EXPORT_SYMBOL_GPL(unregister_security); |
201 | EXPORT_SYMBOL_GPL(mod_reg_security); | 179 | EXPORT_SYMBOL_GPL(mod_reg_security); |
202 | EXPORT_SYMBOL_GPL(mod_unreg_security); | 180 | EXPORT_SYMBOL_GPL(mod_unreg_security); |
203 | EXPORT_SYMBOL(capable); | ||
204 | EXPORT_SYMBOL(security_ops); | 181 | EXPORT_SYMBOL(security_ops); |