Subject: Re: alarm(4G)?
To: None <mason@primenet.com.au>
From: Paul Wain <paul.wain@nc.com>
List: current-users
Date: 01/06/1999 23:42:00
This one makes some sense when you think about it in terms of say NFS et al...
uid=-1, gid=-1 => nobody/unknown on NFS/PCNFS
uid=-2, gid=-2 => bad root access over NFS/PCNFS - see exports(5)
Thus, the max valid value for uid/gid is (signed int) -3, or 2^31-2 (-1 is 2^32,
-2 is 2^31-1) assuming that uid and gid are 32 bit ints (try teaching that to
e.g. a SunOS 4.x machine that just mounted you - it uses 16 bit ints but thats
another matter entirely :)
P.
Geoff Wing wrote:
> 4) Another interesting thing: <sys/syslimits.h>
> #define GID_MAX 2147483647U /* max value for a gid_t (2^31-2) */
> #define UID_MAX 2147483647U /* max value for a uid_t (2^31-2) */
> ^^
> yeah?
--
.----------------------------------------------------------------------.
| Paul Wain || Tel: +1 650 631 GOAT (4628) |
| Network Computer Inc. || Web: http://www.nc.com/ |
| Redwood Shores, CA 94040 || |
`----------------------------------------------------------------------'