Re: [virt-bootstrap] [PATCH v6 02/26] untar: Improve command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2017-08-17 at 10:39 +0100, Radostin Stoyanov wrote:
> Add the flag "--absolute-names" to disable the strip of leading '/'s
> and "--overwrite" to enforce the overwrite of existing files.

Why adding --absolute-names? This could let the user write files outside
the rootfs I guess. Did you get the case with an official docker image?

--
Cedric

> ---
>  src/virtBootstrap/utils.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/virtBootstrap/utils.py b/src/virtBootstrap/utils.py
> index 63ef57a..5095ccf 100644
> --- a/src/virtBootstrap/utils.py
> +++ b/src/virtBootstrap/utils.py
> @@ -106,7 +106,8 @@ def safe_untar(src, dest):
>  
>      # Compression type is auto detected from tar
>      # Exclude files under /dev to avoid "Cannot mknod: Operation not permitted"
> -    params = ['--', '/bin/tar', 'xf', src, '-C', '/mnt', '--exclude', 'dev/*']
> +    params = ['--', '/bin/tar', 'xf', src, '-C', '/mnt', '--exclude', 'dev/*',
> +              '--overwrite', '--absolute-names']
>      execute(virt_sandbox + params)
>  
>  

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux