Date: Sat, 11 Mar 2000 23:40:07 +0000 From: Paul Richards <paul@originative.co.uk> To: current@FreeBSD.org Subject: MAX_UID ? Message-ID: <38CAD957.3C839375@originative.co.uk>
next in thread | raw e-mail | index | archive | help
The fix I applied to pwd_mkdb is an improvement over what was there
before i.e. nothing, but is a poor solution at the moment since it won't
work correctly on the alpha.
The following code snippet is OK on the i386 but on the alpha ULONG_MAX
is 64 bits and so is a totally wrong constant to check a max uid
against.
id = strtoul(p, (char **)NULL, 10);
if (errno == ERANGE) {
warnx("%s > max uid value (%lu)", p, ULONG_MAX);
return (0)
}
I think we need a MAX_UID and a MAX_GID to perform checks like this.
Anyone got any objections to adding them to /usr/include/limits.h ?
Paul.
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?38CAD957.3C839375>
