Francesco Romani has uploaded a new change for review.
Change subject: mkimage: set uid/gid right before mkisofs
......................................................................
mkimage: set uid/gid right before mkisofs
Now that we prepare a file with the right permission
from the start, is worth setting uid/gid right from the
start as well, and not afterwards.
Change-Id: I34dfb486b223d1586480417afba9844e785038e4
Related-To:
https://bugzilla.redhat.com/1278414
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/mkimage.py
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/39/48539/1
diff --git a/vdsm/mkimage.py b/vdsm/mkimage.py
index 07757bc..62cddbe 100644
--- a/vdsm/mkimage.py
+++ b/vdsm/mkimage.py
@@ -133,6 +133,10 @@
# permissions.
os.open(isopath, os.O_CREAT | os.O_RDWR, mode=0o600)
+ os.chown(isopath,
+ resolveUid(DISKIMAGE_USER),
+ resolveGid(DISKIMAGE_GROUP))
+
rc, out, err = execCmd(command, raw=True)
if rc:
raise OSError(errno.EIO, "could not create iso file: "
--
To view, visit
https://gerrit.ovirt.org/48539
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I34dfb486b223d1586480417afba9844e785038e4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>