Re: UID Limit
On Wed, May 22, 2002 at 04:53:37PM -0700, Darren Pilgrim wrote: Peter Pentchev wrote: On Wed, May 22, 2002 at 04:27:12PM +0100, Jamie Heckford wrote: Hi, I was wondering if anyone would be able to tell me what the limit is on a UID? Ie what is the highest integer it can go up to. I suppose as well some applications have different values.. or am I completly wrong :) The functions that deal with user ID's take a parameter of type uid_t. The uid_t type is defined in sys/types.h as u_int32_t. Hence, at least theoretically, FreeBSD supports uid's in the range 0 to 4G-1. It supports them that high, yes, but I believe they wrap at 9. I believe you are thinking of pid's (process ID's), not uid's (user ID's). G'luck, Peter -- Peter Pentchev [EMAIL PROTECTED][EMAIL PROTECTED] PGP key:http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 This sentence contradicts itself - or rather - well, no, actually it doesn't! msg34568/pgp0.pgp Description: PGP signature
Re: UID Limit
Peter Pentchev wrote: I believe you are thinking of pid's (process ID's), not uid's (user ID's). Yes, you're right. Serves me for trying to do email after a long night of hacking at perverse bit-twiddling scripts. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
UID Limit
Hi, I was wondering if anyone would be able to tell me what the limit is on a UID? Ie what is the highest integer it can go up to. I suppose as well some applications have different values.. or am I completly wrong :) Thanks Jamie To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: UID Limit
On Wed, May 22, 2002 at 04:27:12PM +0100, Jamie Heckford wrote: Hi, I was wondering if anyone would be able to tell me what the limit is on a UID? Ie what is the highest integer it can go up to. I suppose as well some applications have different values.. or am I completly wrong :) The functions that deal with user ID's take a parameter of type uid_t. The uid_t type is defined in sys/types.h as u_int32_t. Hence, at least theoretically, FreeBSD supports uid's in the range 0 to 4G-1. However, if you decide to go above 64K-1, you may hit various limitations. NFS and NIS (YellowPages), for example, will not be too happy about uid's that big, IIRC. There might be other programs which assume 16-bit uid's, although I cannot think of any at the moment. After 64K-1, the next roadblock is 2G-1, a.k.a. INT_MAX. This will become a problem as soon as some program tries to store an uid_t value into a plain, signed int variable - the value will either turn negative, or be truncated to 2G-1, and much fun will ensue. It is not too common for a program to misuse an uid in this kind, but it is for a gid - there are many programs, including some in the FreeBSD base system, which use 'int' instead of 'gid_t', simply because it's defined that way in gid.h. The 'usual' user creation utilities try to keep the gid the same as the uid, so if you create a user with an uid 2G-1, your gid experience might be.. mm.. interesting. So, to sum it all up - there are no problems, except where there are :) G'luck, Peter -- Peter Pentchev [EMAIL PROTECTED][EMAIL PROTECTED] PGP key:http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 If the meanings of 'true' and 'false' were switched, then this sentence wouldn't be false. msg34559/pgp0.pgp Description: PGP signature
Re: UID Limit
Peter Pentchev wrote: On Wed, May 22, 2002 at 04:27:12PM +0100, Jamie Heckford wrote: Hi, I was wondering if anyone would be able to tell me what the limit is on a UID? Ie what is the highest integer it can go up to. I suppose as well some applications have different values.. or am I completly wrong :) The functions that deal with user ID's take a parameter of type uid_t. The uid_t type is defined in sys/types.h as u_int32_t. Hence, at least theoretically, FreeBSD supports uid's in the range 0 to 4G-1. It supports them that high, yes, but I believe they wrap at 9. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message