Subject: CVS commit: src/usr.sbin/user
To: None <source-changes@NetBSD.org>
From: Havard Eidnes <he@netbsd.org>
List: source-changes
Date: 08/12/2005 21:40:35
Module Name:	src
Committed By:	he
Date:		Fri Aug 12 21:40:35 UTC 2005

Modified Files:
	src/usr.sbin/user: user.c

Log Message:
Check the return value from mktime() and pass any error up.

*tp > LONG_MAX is never true, so replace that check with a test
for strtol() setting errno == ERANGE (oddly, some ports' build
swallowed this without warning).

There's no guarantee that a time_t stores the same number of bits
as a long, so check for an overflow there as well, and pass any
error up.

Discussed with christos, martin and mrg.


To generate a diff of this commit:
cvs rdiff -r1.87 -r1.88 src/usr.sbin/user/user.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.