From: Keith Bostic Date: Mon, 27 Mar 1989 11:39:22 +0000 (-0800) Subject: if password less than 8 chars, it uses the newline X-Git-Tag: BSD-4_3_Tahoe-Snapshot-Development~598 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/2a36a68c703ced59f340b5e5e0686db7cb81c4aa?hp=6b557231feedb2d53389ede830bb3425e3e9eb85 if password less than 8 chars, it uses the newline SCCS-vsn: usr.bin/lock/lock.c 5.10 --- diff --git a/usr/src/usr.bin/lock/lock.c b/usr/src/usr.bin/lock/lock.c index c40fc0fc8a..916785d50d 100644 --- a/usr/src/usr.bin/lock/lock.c +++ b/usr/src/usr.bin/lock/lock.c @@ -22,7 +22,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)lock.c 5.9 (Berkeley) %G%"; +static char sccsid[] = "@(#)lock.c 5.10 (Berkeley) %G%"; #endif /* not lint */ /* @@ -159,6 +159,7 @@ main(argc, argv) continue; } if (usemine) { + s[strlen(s) - 1] = '\0'; if (!strcmp(mypw, crypt(s, mypw))) break; }