Dan Kenigsberg has posted comments on this change.

Change subject: vm payload: add file injection to vm
......................................................................


Patch Set 7: (2 inline comments)

....................................................
File vdsm/mkimage.py
Line 46:     dirname = tempfile.mkdtemp(prefix=P_PAYLOAD_PREFIX)
why are you not content using plain tempfile.mkdtemp()? What is your security 
concern?

In any case, even if you keep dir=P_PAYLOAD_PREFIX, please avoid the race 
above, and wrap os.mkdir() with try:except:.

Line 81:             for file in os.listdir(dirname):
I suggest that you add an *optional* arg to _decodeFilesInDir(files, dir=None)
and create a temp dir only if this is required.

this needless copy is just another point of failure.

--
To view, visit http://gerrit.ovirt.org/2321
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I256475342c79690a95ad999335522f99714cdc8b
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Shahar Havivi <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to