Change in vdsm[master]: mkimage: setup right permissions before mkisofs

nsoffer at redhat.com nsoffer at redhat.com
Fri Nov 13 12:39:03 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: mkimage: setup right permissions before mkisofs
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

Much nicer!

https://gerrit.ovirt.org/#/c/48538/1/vdsm/mkimage.py
File vdsm/mkimage.py:

Line 130: 
Line 131:         # pre-create the destination iso path with the right permissions;
Line 132:         # mkisofs/genisoimage will truncate the content and keep the
Line 133:         # permissions.
Line 134:         os.open(isopath, os.O_CREAT | os.O_RDWR, mode=0o600)
- We leak fd, should close the fd right after we opened the file
- We don't need to open for writing
- Previously we used umask=0027, creating file with mode 0640, now we are using 0600 - is this intended change?
Line 135: 
Line 136:         rc, out, err = execCmd(command, raw=True)
Line 137:         if rc:
Line 138:             raise OSError(errno.EIO, "could not create iso file: "


-- 
To view, visit https://gerrit.ovirt.org/48538
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibc971a39ae2a8eaf7af934bb0922647e4676d03f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list