Re: [patch 5/7] uninline capable()
From: Matt Mackall
Date: Fri Jan 06 2006 - 19:33:52 EST
On Fri, Jan 06, 2006 at 11:42:40AM +0100, Arjan van de Ven wrote:
> Subject: uninline capable()
> From: Ingo Molnar <mingo@xxxxxxx>
>
> uninline capable(). Saves 2K of kernel text on a generic .config, and 1K
> on a tiny config. In addition it makes the use of capable more consistent
> between CONFIG_SECURITY and !CONFIG_SECURITY
>
> Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
You forgot your sign-off.
> +#ifndef CONFIG_SECURITY
> +int capable(int cap)
> +{
> + if (cap_raised(current->cap_effective, cap)) {
> + current->flags |= PF_SUPERPRIV;
> + return 1;
Tabs, please.
> + }
> + return 0;
> +}
> +EXPORT_SYMBOL(capable);
> +#endif
> +
Also, I wonder if kernel/sys.c is really the best place for this. I'd
think security/std.c or the like would be preferable.
--
Mathematics is the supreme nostalgia of our time.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/