7.0 & Mt. Xinu's getpwuid()

Jaap Akkerhuis jaap+ at andrew.cmu.edu
Tue Mar 20 04:07:16 AEST 1990


Excerpts from netnews.comp.unix.questions: 17-Mar-90 Re: 7.0 & Mt.
Xinu's getpwu.. Barton E. Schaefer at ogics (1585)

>  (And why the devil didn't Xinu
> use the *same* type as the argument to getpwuid()?)

I don't know, but Unix is riddled with these inconsistencies. Scanning
for instance the AT&T SVID Issue 2, you will find that getuid() returns
an unsigned short while setuid just expect an int, so the common code
setuid(getuid()) is actually incorrect according to the SVID. It should
be setuid((int)getuid()).

Hopefully POSIX will get rid of all these problems, but I'm not holding
my breath. When X/Open was in the process of producing their first
version of the X/Open recomendations, they had corrected a lot of these
anomalies. However, they had to retract that version on order of AT&T.
This makes me wonder whether AT&T SVID will ever be POSIX compliant.

	jaap



More information about the Comp.unix.questions mailing list