From: Edgar Toernig Date: Tue, 23 May 2006 15:20:53 GMT Subject: Re: Git 1.3.2 on Solaris Message-ID: <20060523172053.60ec1145.froese@gmx.de> In-Reply-To: Linus Torvalds wrote: > > > - printf ("access: %d\n", access("/etc/motd", X_OK)); > > [...] > > - will return 0 on solaris - when run as root, even though /etc/motd > > - is not executeable. > > > > This is explicitly allowed by the SUS, even for non-root: > > New implementations are discouraged from returning X_OK unless at > least one execution permission bit is set." > > which clearly says "Solaris is CRAP" to me. Just for the record: firefox's download manager performs exactly this test to decide whether you can 'open with' a file (pretty silly because the test is done on the freshly downloaded file in the temp dir which never has an x-bit set). But I was hit by this effect on my system which is - surprise surprise - Linux :-) Ok, it's a pretty old one with a 2.0 kernel and libc 5. But nevertheless, access(2) is not the right function to portably test the x-bit. Ciao, ET.