diff options
Diffstat (limited to 'usr.bin/chpass/pw_yp.c')
-rw-r--r-- | usr.bin/chpass/pw_yp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/chpass/pw_yp.c b/usr.bin/chpass/pw_yp.c index e1dd1742b41..136d363944c 100644 --- a/usr.bin/chpass/pw_yp.c +++ b/usr.bin/chpass/pw_yp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pw_yp.c,v 1.9 1998/08/03 17:09:47 millert Exp $ */ +/* $OpenBSD: pw_yp.c,v 1.10 1999/08/06 20:41:06 deraadt Exp $ */ /* $NetBSD: pw_yp.c,v 1.5 1995/03/26 04:55:33 glass Exp $ */ /* @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)pw_yp.c 1.0 2/2/93"; #else -static char rcsid[] = "$OpenBSD: pw_yp.c,v 1.9 1998/08/03 17:09:47 millert Exp $"; +static char rcsid[] = "$OpenBSD: pw_yp.c,v 1.10 1999/08/06 20:41:06 deraadt Exp $"; #endif #endif /* not lint */ @@ -131,8 +131,8 @@ pw_yp(pw, uid) if (*p == '&') alen = alen + strlen(pw->pw_name) - 1; if (strlen(pw->pw_name) + 1 + strlen(pw->pw_passwd) + 1 + - strlen((sprintf(buf, "%d", pw->pw_uid), buf)) + 1 + - strlen((sprintf(buf, "%d", pw->pw_gid), buf)) + 1 + + strlen((sprintf(buf, "%u", pw->pw_uid), buf)) + 1 + + strlen((sprintf(buf, "%u", pw->pw_gid), buf)) + 1 + strlen(pw->pw_gecos) + alen + 1 + strlen(pw->pw_dir) + 1 + strlen(pw->pw_shell) >= 1023) { warnx("entries too long"); @@ -279,7 +279,7 @@ ypgetpwuid(uid) exit(1); } - sprintf(namebuf, "%d", uid); + sprintf(namebuf, "%u", uid); reason = yp_match(domain, "passwd.byuid", namebuf, strlen(namebuf), &val, &vallen); switch(reason) { |