getuid() and geteuid() on Ultrix 2.0

Brian Wallis brw at jim.odr.oz
Thu Oct 27 10:29:19 AEST 1988


(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 at jim.odr.oz)		    O'Dowd Research P/L.
	(03) 562-0100 Fax: (03) 562-0616,
	Telex: Jacobs Radio (Bayswater) 152093



More information about the Comp.unix.wizards mailing list