summaryrefslogtreecommitdiffstats
path: root/src/virtBootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'src/virtBootstrap')
-rwxr-xr-xsrc/virtBootstrap/virt_bootstrap.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/virtBootstrap/virt_bootstrap.py b/src/virtBootstrap/virt_bootstrap.py
index 2ff1b4b..9190e80 100755
--- a/src/virtBootstrap/virt_bootstrap.py
+++ b/src/virtBootstrap/virt_bootstrap.py
@@ -109,6 +109,13 @@ def bootstrap(uri, dest,
"""
Get source object and call unpack method
"""
+ if fmt == 'dir' and os.geteuid() != 0:
+ if uid_map or gid_map:
+ raise ValueError("UID/GID mapping with 'dir' format is "
+ "allowed only for root.")
+ logger.warning("All extracted files will be owned by the current "
+ "unprivileged user.")
+
# Get instance of progress storing module
prog = progress.Progress(progress_cb)