[virt-tools-list] [virt-bootstrap] [PATCH v6 02/26] untar: Improve command
Cedric Bosdonnat
cbosdonnat at suse.com
Sat Aug 19 05:29:48 UTC 2017
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)
>
>
More information about the virt-tools-list
mailing list