[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1375901563.2644.84.camel@deadeye.wl.decadent.org.uk>
Date: Wed, 7 Aug 2013 20:52:43 +0200
From: Ben Hutchings <bhutchings@...arflare.com>
To: Rui Xiang <rui.xiang@...wei.com>
CC: <containers@...ts.linux-foundation.org>,
<linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
<netfilter-devel@...r.kernel.org>, <serge.hallyn@...ntu.com>,
<ebiederm@...ssion.com>, <akpm@...ux-foundation.org>,
<gaofeng@...fujitsu.com>, <guz.fnst@...fujitsu.com>,
<libo.chen@...wei.com>
Subject: Re: [PATCH v3 04/11] syslog_ns: make syslog handling per namespace
On Wed, 2013-08-07 at 15:37 +0800, Rui Xiang wrote:
> This patch makes syslog buf and other fields per
> namespace.
>
> Here use ns->log_buf(log_buf_len, logbuf_lock,
> log_first_seq, logbuf_lock, and so on) fields
> instead of global ones to handle syslog.
[...]
> --- a/kernel/printk.c
> +++ b/kernel/printk.c
[...]
> }
>
> -#ifdef CONFIG_SECURITY_DMESG_RESTRICT
> -int dmesg_restrict = 1;
> -#else
> -int dmesg_restrict;
> -#endif
> -
> -static int syslog_action_restricted(int type)
> +static int syslog_action_restricted(int type,
> + struct syslog_namespace *ns)
> {
> - if (dmesg_restrict)
> + if (ns->dmesg_restrict)
> return 1;
> /*
> * Unless restricted, we allow "read all" and "get buffer size"
[...]
I don't think this should be a per-namespace setting. And it certainly
should not be possible for child namespaces to disable dmesg_restrict if
it is enabled by a parent namespace.
In later patches, it appears to be copied into child namespaces but not
made visible or controllable there. So if an administrator enables
dmesg_restrict in the initial syslog namespace after another syslog
namespace has been created, she won't be able to tell that it is still
disabled in that other namespace.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists