Re: max uid value
Ulrich Drepper <[email protected]> Mon, 24 Jul 2006 06:10:12 -0700
| Newsgroups | gmane.linux.pld.shadow.general |
|---|---|
| Organization | Red Hat, Inc. |
| Message-ID | <[email protected]> |
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============0456207566== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigC02EC9AF699AC9E03E4C0452" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC02EC9AF699AC9E03E4C0452 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Tomasz K=C5=82oczko wrote: > $ grep UID /usr/include/limits.h=20 > #define UID_MAX 2147483647 /* max value for a user or grou= p ID */ The value is just 2^31-1. It is of course the same limit we have. [GU]IDs cannot be negative but the type is signed. So the max value is the one above. > If yes: before fixing above bug probably must be fixed glibc for add ab= ove UID_MAX. Not really. This is no name specified in any specified in any specification. I.e., it's a non-standard extension. We _could_ add it but I rather wouldn't unless there is a really good reason. Programs can easily define the value themselves or simply add a trivial test for negative values. The above value would only be useful if you'd do your computations with an unsigned or a larger type. Just don't do it. Use [gu]id_t and test for negative values. That's the simplest way to do it. --=20 =E2=9E=A7 Ulrich Drepper =E2=9E=A7 Red Hat, Inc. =E2=9E=A7 444 Castro St = =E2=9E=A7 Mountain View, CA =E2=9D=96 --------------enigC02EC9AF699AC9E03E4C0452 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFExMa02ijCOnn/RHQRAspTAKCc50dWQAvkuubEpf32HLY2DbiqWgCeIF2H OzeIeGf+hxeOQlPx7kjhRV8= =3uF+ -----END PGP SIGNATURE----- --------------enigC02EC9AF699AC9E03E4C0452-- --===============0456207566== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline