Change in vdsm[master]: BZ#726105 - Check that qemu can also access file mounts

Saggi Mizrahi smizrahi at redhat.com
Wed Aug 3 09:17:54 UTC 2011


Saggi Mizrahi has posted comments on this change.

Change subject: BZ#726105 - Check that qemu can also access file mounts
......................................................................


Patch Set 2: (6 inline comments)

....................................................
File vdsm/storage/fileUtils.py
Line 156: def validateAccess(targetPath, perms=(os.R_OK | os.W_OK | os.X_OK)):
No such thing. From the man page
"The mode specifies the accessibility check(s) to be performed,  and is either the value F_OK, or a mask consisting of the bitwise OR of one or more of R_OK, W_OK, and X_OK."

Line 160:     if not os.access(targetPath, perms):
No oop in superVDSM :(

Line 236:     if isinstance(user, types.StringTypes):
I thought about it and "36" relates to the user named 36 that might have a different uid. This is the logical way to solve this. This is why I changed it from int(arg) to isinstance

....................................................
File vdsm/storage/storage_connection.py
Line 172:                         validateDirAccess(mntPath)
This is not the place to be OOPing. OOPing should be done int the lowest level possible

....................................................
File vdsm/supervdsmServer.py
Line 106:     def validateAccess(self, user, group, *args):
Because I wrap fileUtils.access, no need to use named args

Line 107:         return self._runAs(user, group, _validateAccess, args=args)
because of how runAs works

--
To view, visit http://gerrit.usersys.redhat.com/776
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9367410e0172569b4ccb83d5cea1064771f66bb7
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Ayal Baron
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Eduardo Warszawski <ewarszaw at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>


More information about the vdsm-patches mailing list