[lxc-devel] [PATCH] lxc-ubuntu-cloud: pass --numeric-owner and -p to untar

Stéphane Graber stgraber at ubuntu.com
Mon Oct 7 21:29:43 UTC 2013


On Mon, Oct 07, 2013 at 04:16:05PM -0500, Serge Hallyn wrote:
> An example of where this can break is if you pass in sshkey to user
> ubuntu in the container, where user ubuntu exists with different uid
> on host.
> 
> Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

> ---
>  templates/lxc-ubuntu-cloud.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/templates/lxc-ubuntu-cloud.in b/templates/lxc-ubuntu-cloud.in
> index 47a5fca..fdea822 100644
> --- a/templates/lxc-ubuntu-cloud.in
> +++ b/templates/lxc-ubuntu-cloud.in
> @@ -371,7 +371,7 @@ do_extract_rootfs() {
>      echo "Extracting container rootfs"
>      mkdir -p $rootfs
>      cd $rootfs
> -    tar -zxf $cache/$filename
> +    tar --numeric-uid -xpzf "$cache/$filename"
>  }
>  
>  if [ -n "$tarball" ]; then
> -- 
> 1.8.1.2
> 
> 
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&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/20131007/71c77753/attachment.pgp>


More information about the lxc-devel mailing list