Re: Git 1.3.2 on Solaris
- From
- Edgar Toernig <froese@gmx.de>
- Date
- May 23, 2006, 15:20 UTC
- Message-ID
- <20060523172053.60ec1145.froese@gmx.de>
- In-Reply-To
- <Pine.LNX.4.64.0605230744350.5623@g5.osdl.org>
Linus Torvalds wrote:
Show 12 quoted lines
>
> > - 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.