[lxc-devel] [PATCH] lxc-ubuntu-cloud: pass --numeric-owner and -p to untar
Serge Hallyn
serge.hallyn at ubuntu.com
Mon Oct 7 21:16:05 UTC 2013
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>
---
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
More information about the lxc-devel
mailing list