FreeBSD Bugzilla – Attachment 5633 Details for
Bug 13344
[PATCH] Reduce pwd_mkdb verbosity for id's > USHRT_MAX
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.86 KB, created by
Sheldon Hearn
on 1999-08-24 09:20:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Sheldon Hearn
Created:
1999-08-24 09:20:00 UTC
Size:
1.86 KB
patch
obsolete
>Index: pw_scan.c >=================================================================== >RCS file: /home/ncvs/src/usr.sbin/pwd_mkdb/pw_scan.c,v >retrieving revision 1.6 >diff -u -d -r1.6 pw_scan.c >--- pw_scan.c 1997/10/10 06:27:06 1.6 >+++ pw_scan.c 1999/08/24 07:48:37 >@@ -56,6 +56,9 @@ > > #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 > pw_scan(bp, pw) > char *bp; >@@ -84,9 +87,9 @@ > warnx("root uid should be 0"); > return (0); > } >- if (id > USHRT_MAX) { >- warnx("%s > max uid value (%d)", p, USHRT_MAX); >- /*return (0);*/ /* THIS SHOULD NOT BE FATAL! */ >+ if (id > USHRT_MAX && !(big_uids++)) { >+ warnx("%s > legacy max uid value (%d): " >+ "no more such warnings", p, USHRT_MAX); > } > pw->pw_uid = id; > >@@ -94,9 +97,9 @@ > goto fmt; > if(p[0]) pw->pw_fields |= _PWF_GID; > id = atol(p); >- if (id > USHRT_MAX) { >- warnx("%s > max gid value (%d)", p, USHRT_MAX); >- /* return (0); This should not be fatal! */ >+ if (id > USHRT_MAX && !(big_gids++)) { >+ warnx("%s > max gid value (%d): " >+ "no more such warnings", p, USHRT_MAX); > } > pw->pw_gid = id; > >Index: pwd_mkdb.8 >=================================================================== >RCS file: /home/ncvs/src/usr.sbin/pwd_mkdb/pwd_mkdb.8,v >retrieving revision 1.9 >diff -u -d -r1.9 pwd_mkdb.8 >--- pwd_mkdb.8 1999/07/12 20:12:20 1.9 >+++ pwd_mkdb.8 1999/08/24 08:06:24 >@@ -149,6 +149,13 @@ > to install them. > The program was renamed in order that previous users of the program > 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 legacy >+software. Only the first such UID and the first such GID will produce a >+warning. > .Sh SEE ALSO > .Xr chpass 1 , > .Xr passwd 1 ,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 13344
: 5633