[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181031124435.GA9007@redhat.com>
Date: Wed, 31 Oct 2018 13:44:35 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Daniel Colascione <dancol@...gle.com>,
linux-kernel@...r.kernel.org, timmurray@...gle.com,
joelaf@...gle.com, surenb@...gle.com,
Kees Cook <keescook@...omium.org>,
Christian Brauner <christian.brauner@...onical.com>
Subject: Re: [RFC PATCH] Implement /proc/pid/kill
On 10/30, Eric W. Biederman wrote:
>
> At a bare minimum you need to perform the permission check using the
> credentials of the opener of the file. Which means refactoring
> kill_pid so that you can perform the permission check for killing the
> application during open.
perhaps it would be simpler to do
my_cred = override_creds(file->f_cred);
kill_pid(...);
revert_creds(my_cred);
?
> But overall this looks quite reasaonble.
Agreed.
Oleg.
Powered by blists - more mailing lists