Re: [PATCH] Make /proc/slabinfo 0400

From: Dave Hansen
Date: Thu Mar 03 2011 - 13:17:53 EST


On Thu, 2011-03-03 at 12:50 -0500, Dan Rosenberg wrote:
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -4691,7 +4691,7 @@ static const struct file_operations proc_slabinfo_operations = {
>
> static int __init slab_proc_init(void)
> {
> - proc_create("slabinfo", S_IRUGO, NULL, &proc_slabinfo_operations);
> + proc_create("slabinfo", S_IRUSR, NULL, &proc_slabinfo_operations);
> return 0;
> }
> module_init(slab_proc_init);

Please don't. In reality, it'll just mean that more data collection
things will have to get done as root, and I'll wear my keyboard out more
often sudo'ing.

If you really want this on particularly pedantic systems, why not chmod?

-- Dave

--
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/