From owner-freebsd-hackers Mon Aug 23 23:29:54 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from gilliam.users.flyingcroc.net (gilliam.users.flyingcroc.net [207.246.128.2]) by hub.freebsd.org (Postfix) with ESMTP id 0C30115912; Mon, 23 Aug 1999 23:29:10 -0700 (PDT) (envelope-from ross@gilliam.users.flyingcroc.net) Received: (from ross@localhost) by gilliam.users.flyingcroc.net (8.9.3/8.9.3) id XAA04679; Mon, 23 Aug 1999 23:28:15 -0700 (PDT) Date: Wed, 18 Aug 1999 11:43:05 -0700 (PDT) Message-Id: <199908240628.XAA04679@gilliam.users.flyingcroc.net> From: Chris Costello Subject: Re: cvs commit: src/bin/test test.c To: Sheldon Hearn Cc: Brian Feldman , hackers@FreeBSD.ORG Reply-To: chris@calldei.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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message