summaryrefslogtreecommitdiff
path: root/usr.bin/skeyinit
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-01-26 16:25:35 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-01-26 16:25:35 +0000
commit1cc86e0bd9c04751df43309db966c517aaf7dbc4 (patch)
treef7704a941ec2a5448723b01da2f2a78c0f266015 /usr.bin/skeyinit
parent8962ac7f63d8be2d24b21a012e706b2cf9790acf (diff)
Fix stupid bug in last commit that caused the hostname not to
be used as part of the seed for first time users.
Diffstat (limited to 'usr.bin/skeyinit')
-rw-r--r--usr.bin/skeyinit/skeyinit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/skeyinit/skeyinit.c b/usr.bin/skeyinit/skeyinit.c
index 1086a0adc04..18d07e224b9 100644
--- a/usr.bin/skeyinit/skeyinit.c
+++ b/usr.bin/skeyinit/skeyinit.c
@@ -1,5 +1,4 @@
-/* $OpenBSD: skeyinit.c,v 1.25 2000/11/16 15:15:58 millert Exp $ */
-/* $NetBSD: skeyinit.c,v 1.6 1995/06/05 19:50:48 pk Exp $ */
+/* $OpenBSD: skeyinit.c,v 1.26 2001/01/26 16:25:34 millert Exp $ */
/* S/KEY v1.1b (skeyinit.c)
*
@@ -63,8 +62,9 @@ main(argc, argv)
err(1, "gethostname");
for (i = 0, p = defaultseed; hostname[i] && i < SKEY_NAMELEN; i++) {
if (isalpha(hostname[i])) {
- if (isupper(*p))
- *p++ = tolower(hostname[i]);
+ if (isupper(hostname[i]))
+ hostname[i] = tolower(hostname[i]);
+ *p++ = hostname[i];
} else if (isdigit(hostname[i]))
*p++ = hostname[i];
}