lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51F63BD2.6090902@cn.fujitsu.com>
Date:	Mon, 29 Jul 2013 17:54:26 +0800
From:	Gao feng <gaofeng@...fujitsu.com>
To:	Gu Zheng <guz.fnst@...fujitsu.com>
CC:	Rui Xiang <rui.xiang@...wei.com>,
	containers@...ts.linux-foundation.org,
	linux-kernel@...r.kernel.org, serge.hallyn@...ntu.com,
	ebiederm@...ssion.com, akpm@...ux-foundation.org,
	libo.chen@...wei.com
Subject: Re: [PATCH 2/9] syslog_ns: add syslog_ns into user_namespace

On 07/29/2013 05:46 PM, Gu Zheng wrote:
> Hi Rui,
> 
> On 07/29/2013 10:31 AM, Rui Xiang wrote:
> 
>> Add a syslog_ns pointer to user_namespace, and make
>> syslog_ns per user_namespace, not global.
>>
>> Since syslog_ns is assigned to user_ns, we can have
>> full capabilities in new user_ns to create a new syslog_ns.
>>
>> Signed-off-by: Rui Xiang <rui.xiang@...wei.com>
>> ---
>>  include/linux/syslog.h         | 5 +++++
>>  include/linux/user_namespace.h | 1 +
>>  2 files changed, 6 insertions(+)
>>
>> diff --git a/include/linux/syslog.h b/include/linux/syslog.h
>> index 425fafe..62ce47f 100644
>> --- a/include/linux/syslog.h
>> +++ b/include/linux/syslog.h
>> @@ -90,6 +90,11 @@ struct syslog_namespace {
>>  	size_t syslog_partial;
>>  
>>  	int dmesg_restrict;
>> +
>> +	/*
>> +	 * user namespace which owns this syslog ns.
>> +	 */
>> +	struct user_namespace *owner;
>>  };
>>  
>>  static inline struct syslog_namespace *get_syslog_ns(
>> diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
>> index b6b215f..ce2de5b 100644
>> --- a/include/linux/user_namespace.h
>> +++ b/include/linux/user_namespace.h
>> @@ -28,6 +28,7 @@ struct user_namespace {
>>  	unsigned int		proc_inum;
>>  	bool			may_mount_sysfs;
>>  	bool			may_mount_proc;
>> +	struct syslog_namespace *syslog_ns;
> 
> As we add a syslog_ns pointer to user_namespace to make
> syslog_ns per user_namespace and the caps check.
> But why also add a point to syslog_namespace in
> user_namespace? Am I missing something?:)
> 

yep,with this we can make sure all the other types of namespace such as mount, net, pid
can access syslog_ns through user namespace.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ