Back out previous commit. I mistook passing commentary from bde for
review. Requested by: bde
This commit is contained in:
parent
ccbd308159
commit
33d37c13fc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=50700
@ -56,9 +56,6 @@ static const char rcsid[] =
|
|||||||
|
|
||||||
#include "pw_scan.h"
|
#include "pw_scan.h"
|
||||||
|
|
||||||
static int big_uids = 0; /* Used for legacy max uid_t warning */
|
|
||||||
static int big_gids = 0; /* Used for legacy max gid_t warning */
|
|
||||||
|
|
||||||
int
|
int
|
||||||
pw_scan(bp, pw)
|
pw_scan(bp, pw)
|
||||||
char *bp;
|
char *bp;
|
||||||
@ -87,9 +84,9 @@ pw_scan(bp, pw)
|
|||||||
warnx("root uid should be 0");
|
warnx("root uid should be 0");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
if (id > USHRT_MAX && !(big_uids++)) {
|
if (id > USHRT_MAX) {
|
||||||
warnx("%s > legacy max uid value (%d): "
|
warnx("%s > max uid value (%d)", p, USHRT_MAX);
|
||||||
"no more such warnings", p, USHRT_MAX);
|
/*return (0);*/ /* THIS SHOULD NOT BE FATAL! */
|
||||||
}
|
}
|
||||||
pw->pw_uid = id;
|
pw->pw_uid = id;
|
||||||
|
|
||||||
@ -97,9 +94,9 @@ pw_scan(bp, pw)
|
|||||||
goto fmt;
|
goto fmt;
|
||||||
if(p[0]) pw->pw_fields |= _PWF_GID;
|
if(p[0]) pw->pw_fields |= _PWF_GID;
|
||||||
id = atol(p);
|
id = atol(p);
|
||||||
if (id > USHRT_MAX && !(big_gids++)) {
|
if (id > USHRT_MAX) {
|
||||||
warnx("%s > max gid value (%d): "
|
warnx("%s > max gid value (%d)", p, USHRT_MAX);
|
||||||
"no more such warnings", p, USHRT_MAX);
|
/* return (0); This should not be fatal! */
|
||||||
}
|
}
|
||||||
pw->pw_gid = id;
|
pw->pw_gid = id;
|
||||||
|
|
||||||
|
@ -56,9 +56,6 @@ static const char rcsid[] =
|
|||||||
|
|
||||||
#include "pw_scan.h"
|
#include "pw_scan.h"
|
||||||
|
|
||||||
static int big_uids = 0; /* Used for legacy max uid_t warning */
|
|
||||||
static int big_gids = 0; /* Used for legacy max gid_t warning */
|
|
||||||
|
|
||||||
int
|
int
|
||||||
pw_scan(bp, pw)
|
pw_scan(bp, pw)
|
||||||
char *bp;
|
char *bp;
|
||||||
@ -87,9 +84,9 @@ pw_scan(bp, pw)
|
|||||||
warnx("root uid should be 0");
|
warnx("root uid should be 0");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
if (id > USHRT_MAX && !(big_uids++)) {
|
if (id > USHRT_MAX) {
|
||||||
warnx("%s > legacy max uid value (%d): "
|
warnx("%s > max uid value (%d)", p, USHRT_MAX);
|
||||||
"no more such warnings", p, USHRT_MAX);
|
/*return (0);*/ /* THIS SHOULD NOT BE FATAL! */
|
||||||
}
|
}
|
||||||
pw->pw_uid = id;
|
pw->pw_uid = id;
|
||||||
|
|
||||||
@ -97,9 +94,9 @@ pw_scan(bp, pw)
|
|||||||
goto fmt;
|
goto fmt;
|
||||||
if(p[0]) pw->pw_fields |= _PWF_GID;
|
if(p[0]) pw->pw_fields |= _PWF_GID;
|
||||||
id = atol(p);
|
id = atol(p);
|
||||||
if (id > USHRT_MAX && !(big_gids++)) {
|
if (id > USHRT_MAX) {
|
||||||
warnx("%s > max gid value (%d): "
|
warnx("%s > max gid value (%d)", p, USHRT_MAX);
|
||||||
"no more such warnings", p, USHRT_MAX);
|
/* return (0); This should not be fatal! */
|
||||||
}
|
}
|
||||||
pw->pw_gid = id;
|
pw->pw_gid = id;
|
||||||
|
|
||||||
|
@ -149,14 +149,6 @@ style databases for the password file but depended on the calling programs
|
|||||||
to install them.
|
to install them.
|
||||||
The program was renamed in order that previous users of the program
|
The program was renamed in order that previous users of the program
|
||||||
not be surprised by the changes in functionality.
|
not be surprised by the changes in functionality.
|
||||||
.Pp
|
|
||||||
The
|
|
||||||
.Nm
|
|
||||||
program will produce warnings if it finds a UID or GID larger than the
|
|
||||||
historical maximum (USHRT_MAX), as these may cause problems for software
|
|
||||||
which assumes such a maximum.
|
|
||||||
Only the first such UID and the first such GID will produce a
|
|
||||||
warning.
|
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr chpass 1 ,
|
.Xr chpass 1 ,
|
||||||
.Xr passwd 1 ,
|
.Xr passwd 1 ,
|
||||||
|
Loading…
Reference in New Issue
Block a user