Re: [PATCH 2/2] maint: prohibit access(,X_OK)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]