Re: [PATCH v2 1/3] capabilities: Introduce CAP_CHECKPOINT_RESTORE

2020-06-10 Thread Christian Brauner
On Wed, Jun 10, 2020 at 08:41:29AM -0700, Casey Schaufler wrote: > > On 6/10/2020 12:59 AM, Andrei Vagin wrote: > > On Tue, Jun 09, 2020 at 06:14:27PM +0200, Christian Brauner wrote: > >> On Tue, Jun 09, 2020 at 09:06:27AM -0700, Andrei Vagin wrote: > >>> On Tue, Jun 09, 2020 at 09:44:22AM +0200,

Re: [PATCH v2 1/3] capabilities: Introduce CAP_CHECKPOINT_RESTORE

2020-06-10 Thread Casey Schaufler
On 6/10/2020 12:59 AM, Andrei Vagin wrote: > On Tue, Jun 09, 2020 at 06:14:27PM +0200, Christian Brauner wrote: >> On Tue, Jun 09, 2020 at 09:06:27AM -0700, Andrei Vagin wrote: >>> On Tue, Jun 09, 2020 at 09:44:22AM +0200, Christian Brauner wrote: On Mon, Jun 08, 2020 at 08:42:21PM -0700, An

Re: [PATCH v2 1/3] capabilities: Introduce CAP_CHECKPOINT_RESTORE

2020-06-10 Thread Andrei Vagin
On Tue, Jun 09, 2020 at 06:14:27PM +0200, Christian Brauner wrote: > On Tue, Jun 09, 2020 at 09:06:27AM -0700, Andrei Vagin wrote: > > On Tue, Jun 09, 2020 at 09:44:22AM +0200, Christian Brauner wrote: > > > On Mon, Jun 08, 2020 at 08:42:21PM -0700, Andrei Vagin wrote: ... > > > > PTRACE_O_SUSPEND_

Re: [PATCH v2 1/3] capabilities: Introduce CAP_CHECKPOINT_RESTORE

2020-06-09 Thread Cyrill Gorcunov
On Tue, Jun 09, 2020 at 08:09:49PM +, Nicolas Viennot wrote: > >> proc_map_files_get_link(struct dentry *dentry, > >>struct inode *inode, > >>struct delayed_call *done) > >> { > >> - if (!capable(CAP_SYS_ADMIN)) > >> + if (!(capable(CAP_SYS_ADMIN) ||

Re: [PATCH v2 1/3] capabilities: Introduce CAP_CHECKPOINT_RESTORE

2020-06-09 Thread Eric W. Biederman
Nicolas Viennot writes: >>> proc_map_files_get_link(struct dentry *dentry, >>> struct inode *inode, >>> struct delayed_call *done) >>> { >>> - if (!capable(CAP_SYS_ADMIN)) >>> + if (!(capable(CAP_SYS_ADMIN) || capable(CAP_CHECKPOINT_RESTORE))) >>>

RE: [PATCH v2 1/3] capabilities: Introduce CAP_CHECKPOINT_RESTORE

2020-06-09 Thread Nicolas Viennot
>> proc_map_files_get_link(struct dentry *dentry, >> struct inode *inode, >> struct delayed_call *done) >> { >> -if (!capable(CAP_SYS_ADMIN)) >> +if (!(capable(CAP_SYS_ADMIN) || capable(CAP_CHECKPOINT_RESTORE))) >> return ERR_PTR(-EPE

Re: [PATCH v2 1/3] capabilities: Introduce CAP_CHECKPOINT_RESTORE

2020-06-09 Thread Cyrill Gorcunov
On Wed, Jun 03, 2020 at 06:23:26PM +0200, Adrian Reber wrote: > This patch introduces CAP_CHECKPOINT_RESTORE, a new capability facilitating > checkpoint/restore for non-root users. > > Over the last years, The CRIU (Checkpoint/Restore In Userspace) team has been > asked numerous times if it is pos

Re: [PATCH v2 1/3] capabilities: Introduce CAP_CHECKPOINT_RESTORE

2020-06-09 Thread Christian Brauner
On Tue, Jun 09, 2020 at 09:06:27AM -0700, Andrei Vagin wrote: > On Tue, Jun 09, 2020 at 09:44:22AM +0200, Christian Brauner wrote: > > On Mon, Jun 08, 2020 at 08:42:21PM -0700, Andrei Vagin wrote: > > > On Wed, Jun 03, 2020 at 06:23:26PM +0200, Adrian Reber wrote: > > > > This patch introduces CAP_

Re: [PATCH v2 1/3] capabilities: Introduce CAP_CHECKPOINT_RESTORE

2020-06-09 Thread Andrei Vagin
On Tue, Jun 09, 2020 at 09:44:22AM +0200, Christian Brauner wrote: > On Mon, Jun 08, 2020 at 08:42:21PM -0700, Andrei Vagin wrote: > > On Wed, Jun 03, 2020 at 06:23:26PM +0200, Adrian Reber wrote: > > > This patch introduces CAP_CHECKPOINT_RESTORE, a new capability > > > facilitating > > > checkpo

Re: [PATCH v2 1/3] capabilities: Introduce CAP_CHECKPOINT_RESTORE

2020-06-09 Thread Christian Brauner
On Mon, Jun 08, 2020 at 08:42:21PM -0700, Andrei Vagin wrote: > On Wed, Jun 03, 2020 at 06:23:26PM +0200, Adrian Reber wrote: > > This patch introduces CAP_CHECKPOINT_RESTORE, a new capability facilitating > > checkpoint/restore for non-root users. > > > > Over the last years, The CRIU (Checkpoint

Re: [PATCH v2 1/3] capabilities: Introduce CAP_CHECKPOINT_RESTORE

2020-06-08 Thread Andrei Vagin
On Wed, Jun 03, 2020 at 06:23:26PM +0200, Adrian Reber wrote: > This patch introduces CAP_CHECKPOINT_RESTORE, a new capability facilitating > checkpoint/restore for non-root users. > > Over the last years, The CRIU (Checkpoint/Restore In Userspace) team has been > asked numerous times if it is pos

Re: [PATCH v2 1/3] capabilities: Introduce CAP_CHECKPOINT_RESTORE

2020-06-03 Thread Cyrill Gorcunov
On Wed, Jun 03, 2020 at 06:23:26PM +0200, Adrian Reber wrote: ... > > /* > - * Only allow CAP_SYS_ADMIN to follow the links, due to concerns about how > the > - * symlinks may be used to bypass permissions on ancestor directories in the > - * path to the file in question. > + * Only allow CAP_S

[PATCH v2 1/3] capabilities: Introduce CAP_CHECKPOINT_RESTORE

2020-06-03 Thread Adrian Reber
This patch introduces CAP_CHECKPOINT_RESTORE, a new capability facilitating checkpoint/restore for non-root users. Over the last years, The CRIU (Checkpoint/Restore In Userspace) team has been asked numerous times if it is possible to checkpoint/restore a process as non-root. The answer usually wa