[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5561F7BF.7020704@virtuozzo.com>
Date: Sun, 24 May 2015 19:09:35 +0300
From: Vasily Averin <vvs@...tuozzo.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Vasily Averin <vvs@...n.com>
CC: linux-kernel@...r.kernel.org, Kees Cook <keescook@...omium.org>,
Josh Boyer <jwboyer@...hat.com>, Eric Paris <eparis@...hat.com>
Subject: Re: [PATCH] kernel/printk/printk.c: check_syslog_permissions() cleanup
On 15.05.2015 01:01, Andrew Morton wrote:
> On Sun, 10 May 2015 09:35:53 +0300 Vasily Averin <vvs@...n.com> wrote:
>> --- a/kernel/printk/printk.c
>> +++ b/kernel/printk/printk.c
>> @@ -484,11 +484,11 @@ int check_syslog_permissions(int type, bool from_file)
>> * already done the capabilities checks at open time.
>> */
>> if (from_file && type != SYSLOG_ACTION_OPEN)
>> - return 0;
>> + goto ok;
>
> This seems wrong - we should only call security_syslog() for opens?
No I think my version is correct.
Currently security hook _is_ called in this situation:
from_file is set in /proc/kmsg handlers only,
they use do_syslog() and call security_syslog() directly
after check_syslog_permissions() call.
My patch forces check_syslog_permissions() to call security hook in all cases,
that allows to remove extra security_syslog() call from do_syslog().
I've changed patch comment and going to resend new patch version soon.
--
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