X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=security%2Fsecurity.c;h=fc8601b2b7acabde473cc86a0fdc4b342a00e97a;hb=df6d3916f3b7b7e2067567a256dd4f0c1ea854a2;hp=f693e1f66b98521c3c6e0995a5c6182935b1b18a;hpb=0a0fc0ddbe732779366ab6b1b879f62195e65967;p=firefly-linux-kernel-4.4.55.git diff --git a/security/security.c b/security/security.c index f693e1f66b98..fc8601b2b7ac 100644 --- a/security/security.c +++ b/security/security.c @@ -12,11 +12,9 @@ */ #include -#include #include #include #include -#include #include #define SECURITY_FRAMEWORK_VERSION "1.0.0" @@ -174,31 +172,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 (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);