Date: Thu, 9 Apr 1998 03:08:47 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: eivind@yes.no (Eivind Eklund) Cc: current@FreeBSD.ORG Subject: Re: /usr/include/pwd.h Message-ID: <199804090308.UAA25433@usr02.primenet.com> In-Reply-To: <19980407180754.16757@follo.net> from "Eivind Eklund" at Apr 7, 98 06:07:54 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> Does anybody know why the uid and gid field here are int's? (Looks > like hystorical raisons, as they haven't been changed since 4.4Lite). > > Can I change them to uid_t/gid_t, or at least to 'unsigned int' so > they match with chown(2)? I think there are two reasons: Non-opacity. The type is not opaque because of NIS. History. The value of "nobody" on old SunOS systems was "-1". I don't know if the 65534/65535 values are short-converted and sign extended and compared, as in "if( uid < 0)", but there used to be a lot of code that did this. You would really need to look hard to find this. I'm also not sure if there aren't libraries that overload uid return values with "-1" to return an error. I would guess that the value *must* be signed in case there were. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804090308.UAA25433>