The following reply was made to PR misc/156225; it has been noted by GNATS.
From: Mikolaj Golub <[email protected]> To: [email protected], [email protected], [email protected] Cc: Subject: Re: misc/156225: test -x under root in bash shell returns incorrect results Date: Sun, 10 Apr 2011 17:33:29 +0300 Bash checks permission calling eaccess(2). The issue is that it returns success for root: 19632 bash CALL eaccess(0x28417600,X_OK) 19632 bash NAMI "/root/.cshrc" 19632 bash RET eaccess 0 sh's test has a workaround for this: case FILEX: /* XXX work around eaccess(2) false positives for superuser */ if (eaccess(nm, X_OK) != 0) return 0; if (S_ISDIR(s.st_mode) || geteuid() != 0) return 1; The eaccess(2) behaviour has been changed in CURRENT. See kern/125009 for details. I think this ticket can be set as a duplicate of kern/125009. -- Mikolaj Golub _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "[email protected]"
