Re: access(2) shouldn't be used with test(1)

2010-07-20 Thread Garrett Cooper
On Tue, Jul 20, 2010 at 5:16 PM, Chet Ramey wrote: > On 7/20/10 2:00 PM, Garrett Cooper wrote: >>     According to the POSIX spec, using access(2) is implementation >> dependent when running as superuser [1]. FreeBSD intentionally returns >> true whenever euid/uid = 0 [

Re: access(2) shouldn't be used with test(1)

2010-07-20 Thread Garrett Cooper
fstat/whatever. Not having correct data via test(1) renders the utility useless in many scenarios, which isn't desirable... I've found other issues with other implementations of access that need to be resolved as well. This is just one of the problem applications / languages that I'm

Re: access(2) shouldn't be used with test(1)

2010-07-20 Thread Garrett Cooper
On Tue, Jul 20, 2010 at 11:28 AM, Eric Blake wrote: > On 07/20/2010 12:00 PM, Garrett Cooper wrote: >>     According to the POSIX spec, using access(2) is implementation >> dependent when running as superuser [1]. > > But as long as the answer is correct, then the access(2)

Re: access(2) shouldn't be used with test(1)

2010-07-20 Thread Garrett Cooper
On Tue, Jul 20, 2010 at 11:00 AM, Garrett Cooper wrote: >    According to the POSIX spec, using access(2) is implementation > dependent when running as superuser [1]. FreeBSD intentionally returns > true whenever euid/uid = 0 [2]. FreeBSD's /bin/sh doesn't have this &g

access(2) shouldn't be used with test(1)

2010-07-20 Thread Garrett Cooper
According to the POSIX spec, using access(2) is implementation dependent when running as superuser [1]. FreeBSD intentionally returns true whenever euid/uid = 0 [2]. FreeBSD's /bin/sh doesn't have this `issue' with test(1). Example: $ ls -l typescript -rw-r--r-- 1 gcooper gcooper 37875 Jul

Re: Question about inline code / incompatibility between FreeBSD sh and bash

2008-06-21 Thread Garrett Cooper
On Thu, Jun 19, 2008 at 2:29 AM, Garrett Cooper <[EMAIL PROTECTED]> wrote: > On Thu, Jun 19, 2008 at 2:12 AM, Garrett Cooper <[EMAIL PROTECTED]> wrote: >> >> /usr/sbin/portsnap: portsnap: line 882: syntax error near unexpected >> token `newline' >

Re: Question about inline code / incompatibility between FreeBSD sh and bash

2008-06-21 Thread Garrett Cooper
On Thu, Jun 19, 2008 at 2:12 AM, Garrett Cooper <[EMAIL PROTECTED]> wrote: > Hi, > Sorry for emailing this list, but neither the GNU indexed > homepage nor the actual project page listed any other email address. > I'm trying to determine whether or not this is

Question about inline code / incompatibility between FreeBSD sh and bash

2008-06-21 Thread Garrett Cooper
Hi, Sorry for emailing this list, but neither the GNU indexed homepage nor the actual project page listed any other email address. I'm trying to determine whether or not this is an implicit bug or a feature of BSD bourne shell (in particular FreeBSD's sh): When I try and execute `por