Re: [lxc-devel] [PATCH v4] Parse rootfs->path

2015-10-22 Thread Christian Brauner
On Thu, Oct 22, 2015 at 03:33:30AM +, Serge Hallyn wrote: > Quoting Christian Brauner (christianvanbrau...@gmail.com): > > The mount_entry_overlay_dirs() and mount_entry_aufs_dirs() functions create > > workdirs and upperdirs for overlay and aufs lxc.mount.entry entries. They > > try > > to

Re: [lxc-devel] [PATCH v4] Parse rootfs->path

2015-10-22 Thread Christian Brauner
On Thu, Oct 22, 2015 at 02:59:28AM +, Serge Hallyn wrote: > Quoting Christian Brauner (christianvanbrau...@gmail.com): > > On Tue, Oct 20, 2015 at 09:21:48PM +0200, Christian Brauner wrote: > > > The mount_entry_overlay_dirs() and mount_entry_aufs_dirs() functions > > > create > > > workdirs

Re: [lxc-devel] [PATCH v4] Parse rootfs->path

2015-10-21 Thread Serge Hallyn
Quoting Christian Brauner (christianvanbrau...@gmail.com): > On Tue, Oct 20, 2015 at 09:21:48PM +0200, Christian Brauner wrote: > > The mount_entry_overlay_dirs() and mount_entry_aufs_dirs() functions create > > workdirs and upperdirs for overlay and aufs lxc.mount.entry entries. They > > try > >

Re: [lxc-devel] [PATCH v4] Parse rootfs->path

2015-10-21 Thread Serge Hallyn
Quoting Christian Brauner (christianvanbrau...@gmail.com): > The mount_entry_overlay_dirs() and mount_entry_aufs_dirs() functions create > workdirs and upperdirs for overlay and aufs lxc.mount.entry entries. They try > to make sure that the workdirs and upperdirs can only be created under the >

[lxc-devel] [PATCH v4] Parse rootfs->path

2015-10-20 Thread Christian Brauner
The mount_entry_overlay_dirs() and mount_entry_aufs_dirs() functions create workdirs and upperdirs for overlay and aufs lxc.mount.entry entries. They try to make sure that the workdirs and upperdirs can only be created under the containerdir (e.g. /path/to/the/container/CONTAINERNAME). In order to

[lxc-devel] [PATCH v4] Parse rootfs->path

2015-10-20 Thread Christian Brauner
A fresh set of eyes would be nice. :) New solution: Use strstr() to search for ":/". If we find ":/" move the string to "/". Check for a second ":/". If we find it replace ':' with '\0'. If we do not find ":/" return strdup(rootfs->path). Christian Brauner (1): Parse rootfs->path

Re: [lxc-devel] [PATCH v4] Parse rootfs->path

2015-10-20 Thread Christian Brauner
On Tue, Oct 20, 2015 at 09:21:48PM +0200, Christian Brauner wrote: > The mount_entry_overlay_dirs() and mount_entry_aufs_dirs() functions create > workdirs and upperdirs for overlay and aufs lxc.mount.entry entries. They try > to make sure that the workdirs and upperdirs can only be created under