On 03/18/2011 09:43 PM, Eric Blake wrote:
On 03/18/2011 02:46 PM, Eric Blake wrote:
This simplifies several callers that were repeating checks already
guaranteed by util.c, and makes other callers more robust to now
reject directories.  remote_driver.c was over-strict - access(,X_OK)
is not strictly needed to execute a file (although its unusual to see
a file with X_OK but not R_OK).
I meant to say that access(,R_OK) is not strictly necessary.  But I
stand a bit corrected - binaries can be executed without read
permission, but scripts require both execute permission (to do the #!
search) and read permission (for the interpreter to process the script).

Maybe virFileIsExecutable should add a check for readability?

I guess yes, but if there's any case where libvirt will want to have X but not R on a file, it should be optional.

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to