From owner-freebsd-hackers Wed Aug 18 11:41:17 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mta2.rcsntx.swbell.net (mta2.rcsntx.swbell.net [151.164.30.26]) by hub.freebsd.org (Postfix) with ESMTP id 2E3E115063; Wed, 18 Aug 1999 11:41:11 -0700 (PDT) (envelope-from chris@holly.dyndns.org) Received: from holly.dyndns.org (adsl-216-62-154-215.dsl.hstntx.swbell.net) by mta2.rcsntx.swbell.net (Sun Internet Mail Server sims.3.5.1999.05.24.18.28.p7) with ESMTP id <0FGO00E6VBSYBO@mta2.rcsntx.swbell.net>; Wed, 18 Aug 1999 13:38:58 -0500 (CDT) Received: (from chris@localhost) by holly.dyndns.org (8.9.3/8.9.3) id NAA98793; Wed, 18 Aug 1999 13:40:17 -0500 (CDT envelope-from chris) Date: Wed, 18 Aug 1999 13:40:16 -0500 From: Chris Costello Subject: Re: cvs commit: src/bin/test test.c In-reply-to: <15808.934968957@axl.noc.iafrica.com>; from Sheldon Hearn on Wed, Aug 18, 1999 at 11:35:57AM +0200 To: Sheldon Hearn Cc: Brian Feldman , hackers@FreeBSD.ORG Reply-To: chris@calldei.com Message-id: <19990818134016.E97181@holly.dyndns.org> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii User-Agent: Mutt/0.96.3i References: <199908180018.RAA84904@freefall.freebsd.org> <15808.934968957@axl.noc.iafrica.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Aug 18, 1999, Sheldon Hearn wrote: > > green 1999/08/17 17:18:53 PDT > > > > Modified files: > > bin/test test.c > > Log: > > The new test(1) did not use access() correctly. I don't know why, since > > supposedly it's ksh-derived, and it's not broken in pdksh. I've added > > a test for test running as root: if testing for -x, the file must be > > mode & 0111 to get "success", rather than just existant. > > > > Reviewed by: chris > > What were you actually trying to fix, here? I didn't see any discussion > of this on hackers, current or bugs, nor in response to my initial > commit message. He was "fixing" (though, as Bruce pointed out, it wasn't a valid fix) test -x. Apparently, access(2) will return 'success' on access(file, X_OK) if called by a program run by root. The patch partly solves the problem, but the euid-vs-ruid problem remains. -- |Chris Costello |Disc space, the final frontier! `---------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message