X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=security%2Fsecurity.c;fp=security%2Fsecurity.c;h=ee4e0701b6e0bbfb431c5d1fa5672ab036492fa0;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=c5c5793b1a4332d9c27628216598cfe04be19309;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/security/security.c b/security/security.c index c5c5793b1..ee4e0701b 100644 --- a/security/security.c +++ b/security/security.c @@ -12,7 +12,6 @@ */ #include -#include #include #include #include @@ -174,34 +173,8 @@ int mod_unreg_security(const char *name, struct security_operations *ops) return security_ops->unregister_security(name, ops); } -/** - * capable - calls the currently loaded security module's capable() function with the specified capability - * @cap: the requested capability level. - * - * This function calls the currently loaded security module's capable() - * function with a pointer to the current task and the specified @cap value. - * - * This allows the security module to implement the capable function call - * however it chooses to. - */ -int capable(int cap) -{ - if (vx_check_bit(VXC_CAP_MASK, cap) && !vx_mcaps(1L << cap)) - return 0; - if (security_ops->capable(current, cap)) { - /* capability denied */ - return 0; - } - - /* capability granted */ - current->flags |= PF_SUPERPRIV; - return 1; -} - - EXPORT_SYMBOL_GPL(register_security); EXPORT_SYMBOL_GPL(unregister_security); EXPORT_SYMBOL_GPL(mod_reg_security); EXPORT_SYMBOL_GPL(mod_unreg_security); -EXPORT_SYMBOL(capable); EXPORT_SYMBOL(security_ops);