Dan Kenigsberg has posted comments on this change.
Change subject: oop: improve safety for truncateFile
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
....................................................
Commit Message
Line 12: * a new comment has been added mentioning O_TRUNC and "w" to avoid any
Line 13: future mistake in this area
Line 14: * a new test has been added to check the expected outcomes
Line 15: * the "w" mode has been removed from truncateFile (used in os.fdopen)
Line 16: to prevent any future reconversion to open(path, "w")
So this bug is as old as
http://gerrit.ovirt.org/14588 and should be backported to
ovirt-3.3.0, too.
Right?
Line 17: * the risk of a file descriptor leak (for a failing os.fdopen call)
Line 18: has been removed using the relevant posix calls
Line 19:
Line 20: Change-Id: Ib71b53498c7bc4ea7a1ab725feb18bc5929f8c85
--
To view, visit
http://gerrit.ovirt.org/20046
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib71b53498c7bc4ea7a1ab725feb18bc5929f8c85
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv(a)redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes