Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!munnari!bruce!goanna!yabbie!koel!cit5!olympic!jim!brw From: brw@jim.odr.oz (Brian Wallis) Newsgroups: comp.unix.wizards Subject: getuid() and geteuid() on Ultrix 2.0 Message-ID: <579@jim.odr.oz> Date: 27 Oct 88 00:29:19 GMT Article-I.D.: jim.579 Organization: O'Dowd Research Pty. Ltd., Melbourne, Australia. Lines: 44 (I have posted this to comp.unix.ultrix, but the newgroup seems to have died! I haven't seen any articles for more than a month) On Ultrix 2.0 on our MicroVax II, the system calls getuid() and geteuid() both seem to return the same uid no matter what you have su'd to. ie. If I su to 'local' and run a simple program that prints both uid's as returned by getuid and geteuid I get the uid of local from both whereas I thought I should get the uid of me ('brw') from getuid(). Here is tmp.c and the results... > > main() > { > printf("getuid() = %d, geteuid() = %d\n",getuid(),geteuid()); > } > 51% whoami brw 52% who am i jim!brw tty00 Oct 27 09:11 53% cc tmp.c 54% a.out getuid() = 272, geteuid() = 272 55% su local Password: 51% whoami local 52% who am i jim!brw tty00 Oct 27 09:11 53% a.out getuid() = 290, geteuid() = 290 52% This is very annoying! Is this an Ultrix only bug (I have nothing else to try it on) or am I confused and this is correct behaviour? -- Brian Wallis (brw@jim.odr.oz) O'Dowd Research P/L. (03) 562-0100 Fax: (03) 562-0616, Telex: Jacobs Radio (Bayswater) 152093