Xref: utzoo comp.unix.programmer:964 alt.sources.d:1432 Path: utzoo!utgpu!cs.utexas.edu!uunet!mcsun!unido!opal!tmpmbx!netmbx!ripley From: ripley@netmbx.UUCP (Hans-Ch. Eckert) Newsgroups: comp.unix.programmer,alt.sources.d Subject: Re: -x implementations Message-ID: <1805@netmbx.UUCP> Date: 2 Feb 91 14:30:45 GMT References: <1991Jan29.153242.12335@convex.com> <8896@ <19017@rpp386.cactus.org> Organization: netmbx, Berlin, West Germany Lines: 33 In article <19017@rpp386.cactus.org> jfh@rpp386.cactus.org (John F Haugh II) writes: ]In article <8896@star.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes: ]>If your effective uid is that of user `foo', whereas your real uid is ]>that of user `bar': ]> ]> $ ls -l mailbox ]> -rw------- 1 foo 1079 Jan 30 19:26 mailbox ]> $ test -r mailbox || echo 'Huh? Is mailbox unreadable for me?' ]> ]>Access(2), a sick system call. (I _know_ it uses the real uid on ]>purpose.) You mean like this? ripley% su alg053 (ripley)alg053% ls -l /usr/spool/mail/alg053 -rw------- 1 alg053 5940 Feb 2 02:32 /usr/spool/mail/alg053 (ripley)alg053% test -r alg053 || echo 'What happens?' (ripley)alg053% Seems like SunOS 4.1 does it right... ]The question test(1) is asking is wrong. test is supposed to return ]whether or not it =is= readable, not whether it =should= be readable. At least on a sun it returns that the file is readable, which is true. Greetings, RIPLEY -- Hans-Ch.Eckert, Regensburger Str. 2, D-1000 Berlin 30 [Tel: +49 030/246292] eMail: ripley@netmbx.uucp (ripley%netmbx.uucp@db0tui6.bitnet [saves $$$]) Quote: "I'd rather type "cc fubar.c" than point-click-point-click-point- click-point-click-knock-over-my-coffee-cup." [Steve Yelvington, 2-11-89]