[virt-bootstrap] [PATCH v5 07/13] Do not call mapping_uid_gid() for format="qcow2"

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

 



When fmt is qcow2 (fmt == 'dir' is False) mapping_uid_gid() should not
be called.

    >>> False and True or True
    True
    >>> False and (True or True)
    False
---
 src/virtBootstrap/virt_bootstrap.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/virtBootstrap/virt_bootstrap.py b/src/virtBootstrap/virt_bootstrap.py
index 0bc2e2b..0c1626c 100755
--- a/src/virtBootstrap/virt_bootstrap.py
+++ b/src/virtBootstrap/virt_bootstrap.py
@@ -132,7 +132,7 @@ def bootstrap(uri, dest,
         logger.info("Setting password of the root account")
         utils.set_root_password(fmt, dest, root_password)
 
-    if fmt == "dir" and uid_map or gid_map:
+    if fmt == "dir" and (uid_map or gid_map):
         logger.info("Mapping UID/GID")
         utils.mapping_uid_gid(dest, uid_map, gid_map)
 
-- 
2.13.4

_______________________________________________
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