View | Details | Raw Unified | Return to bug 13344
Collapse All | Expand All

(-)pw_scan.c (-6 / +9 lines)
Lines 56-61 Link Here
56
56
57
#include "pw_scan.h"
57
#include "pw_scan.h"
58
58
59
static int big_uids = 0;		/* Used for legacy max uid_t warning */
60
static int big_gids = 0;		/* Used for legacy max gid_t warning */
61
59
int
62
int
60
pw_scan(bp, pw)
63
pw_scan(bp, pw)
61
	char *bp;
64
	char *bp;
Lines 84-92 Link Here
84
		warnx("root uid should be 0");
87
		warnx("root uid should be 0");
85
		return (0);
88
		return (0);
86
	}
89
	}
87
	if (id > USHRT_MAX) {
90
	if (id > USHRT_MAX && !(big_uids++)) {
88
		warnx("%s > max uid value (%d)", p, USHRT_MAX);
91
		warnx("%s > legacy max uid value (%d): "
89
		/*return (0);*/ /* THIS SHOULD NOT BE FATAL! */
92
		    "no more such warnings", p, USHRT_MAX);
90
	}
93
	}
91
	pw->pw_uid = id;
94
	pw->pw_uid = id;
92
95
Lines 94-102 Link Here
94
		goto fmt;
97
		goto fmt;
95
	if(p[0]) pw->pw_fields |= _PWF_GID;
98
	if(p[0]) pw->pw_fields |= _PWF_GID;
96
	id = atol(p);
99
	id = atol(p);
97
	if (id > USHRT_MAX) {
100
	if (id > USHRT_MAX && !(big_gids++)) {
98
		warnx("%s > max gid value (%d)", p, USHRT_MAX);
101
		warnx("%s > max gid value (%d): "
99
		/* return (0); This should not be fatal! */
102
		    "no more such warnings", p, USHRT_MAX);
100
	}
103
	}
101
	pw->pw_gid = id;
104
	pw->pw_gid = id;
102
105
(-)pwd_mkdb.8 (+7 lines)
Lines 149-154 Link Here
149
to install them.
149
to install them.
150
The program was renamed in order that previous users of the program
150
The program was renamed in order that previous users of the program
151
not be surprised by the changes in functionality.
151
not be surprised by the changes in functionality.
152
.Pp
153
The
154
.Nm
155
program will produce warnings if it finds a UID or GID larger than the
156
historical maximum (USHRT_MAX), as these may cause problems for legacy
157
software. Only the first such UID and the first such GID will produce a
158
warning.
152
.Sh SEE ALSO
159
.Sh SEE ALSO
153
.Xr chpass 1 ,
160
.Xr chpass 1 ,
154
.Xr passwd 1 ,
161
.Xr passwd 1 ,

Return to bug 13344