[lxc-devel] [PATCH 1/1] lxcapi_clone: set the right environment variable for mounted fs
Stéphane Graber
stgraber at ubuntu.com
Thu Nov 21 15:11:50 UTC 2013
On Thu, Nov 21, 2013 at 09:05:59AM -0600, Serge Hallyn wrote:
> If the container is dir-backed, we don't actually mount it (to
> support unprivileged use). So always set the LXC_ROOTFS_MOUNT
> to bdev->dest, not to the rootfs path specified in the container
> configuration.
>
> This should fix bug http://pad.lv/1253573
>
> Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>
> ---
> src/lxc/lxccontainer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
> index 11e70cb..c1f99d5 100644
> --- a/src/lxc/lxccontainer.c
> +++ b/src/lxc/lxccontainer.c
> @@ -2399,7 +2399,7 @@ static int clone_update_rootfs(struct lxc_container *c0,
> if (setenv("LXC_CONFIG_FILE", conf->rcfile, 1)) {
> SYSERROR("failed to set environment variable for config path");
> }
> - if (setenv("LXC_ROOTFS_MOUNT", conf->rootfs.mount, 1)) {
> + if (setenv("LXC_ROOTFS_MOUNT", bdev->dest, 1)) {
> SYSERROR("failed to set environment variable for rootfs mount");
> }
> if (setenv("LXC_ROOTFS_PATH", conf->rootfs.path, 1)) {
> --
> 1.8.3.2
>
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20131121/15fc1d6d/attachment.pgp>
More information about the lxc-devel
mailing list