Sandro Bonazzola has posted comments on this change.
Change subject: packaging: fix default filemod in copyFile
......................................................................
Patch Set 3:
(1 comment)
....................................................
File packaging/fedora/setup/common_utils.py
Line 736: # Set file mode, uid and gid to the file
Line 737: logging.debug("setting file %s uid/gid ownership"%(targetFile))
Line 738: os.chown(targetFile, uid, gid)
Line 739:
Line 740: if filemod is not None:
I think you should also check for filemod >= 0, ensuring that if someone try to
set it to -1 it causes no harm.
You can just raise an exception if filemod <0 since
http://docs.python.org/2/library/os.html?highlight=os.chmod#os.chmod explicitly
says that possible values are bitwise ORed combinations of stat constants.
Line 741: logging.debug("setting file %s mode to %d"%(targetFile,
filemod))
Line 742: os.chmod(targetFile, filemod)
Line 743:
Line 744: def getDbAdminUser():
--
To view, visit http://gerrit.ovirt.org/19557
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I9e436d72e8ffb8d48e05201727d5b46797881556
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: engine_3.2
Gerrit-Owner: Yedidyah Bar David <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Ofer Schreiber <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Yedidyah Bar David <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches