[libvirt] [PATCH 2/2] maint: prohibit access(,X_OK)
Eric Blake
eblake at redhat.com
Sat Mar 19 01:43:11 UTC 2011
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?
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110318/3319188d/attachment-0001.sig>
More information about the libvir-list
mailing list