lkml.org 
[lkml]   [2013]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/9] syslog_ns: implement function for creating syslog ns
On 2013/7/29 18:25, Gu Zheng wrote:
> Hi Rui,
>
> On 07/29/2013 10:31 AM, Rui Xiang wrote:
>
>> Add create_syslog_ns function to create a new ns. We
>> must create a user_ns before create a new syslog ns.
>> And then tie the new syslog_ns to current user_ns
>> instead of original syslog_ns which comes from
>> parent user_ns.

...

>> diff --git a/kernel/printk.c b/kernel/printk.c
>> index fd2d600..6b561db 100644
>> --- a/kernel/printk.c
>> +++ b/kernel/printk.c
>> @@ -384,6 +384,10 @@ static int check_syslog_permissions(int type, bool from_file,
>> || type == SYSLOG_ACTION_CONSOLE_LEVEL)
>> ns = &init_syslog_ns;
>>
>> + /* create a new syslog ns */
>> + if (type == SYSLOG_ACTION_NEW_NS)
>> + return 0;
>> +
>
> Don't we need further permission or caps check here? Return success directly seems sloppy.
>
CAP_SYSLOG is checked in create_syslog_ns, so I think we can return 0 temporarily.





\
 
 \ /
  Last update: 2013-07-30 06:01    [W:0.051 / U:1.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site