summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-09-28 00:04:45 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-09-28 00:04:45 +0000
commit6071dc302eba7ec6ba4e78e4e2c405a0b02b7e8c (patch)
treec7df4819619b4c79b2ca8808789311526d086025
parent00e1deba6dde1685f722a802e2b6cb56115914b6 (diff)
Less easily guessed seed. From logdaemon package.
-rw-r--r--usr.bin/skeyinit/skeyinit.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/skeyinit/skeyinit.c b/usr.bin/skeyinit/skeyinit.c
index 98f4e935ea2..1bfbababbaf 100644
--- a/usr.bin/skeyinit/skeyinit.c
+++ b/usr.bin/skeyinit/skeyinit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: skeyinit.c,v 1.4 1996/09/27 15:49:04 millert Exp $ */
+/* $OpenBSD: skeyinit.c,v 1.5 1996/09/28 00:04:44 millert Exp $ */
/* $NetBSD: skeyinit.c,v 1.6 1995/06/05 19:50:48 pk Exp $ */
/* S/KEY v1.1b (skeyinit.c)
@@ -55,8 +55,7 @@ main(argc, argv)
errx(1, "must be setuid root.");
(void)time(&now);
- tm = localtime(&now);
- (void)strftime(tbuf, sizeof(tbuf), "%M%j", tm);
+ (void)sprintf(tbuf, "%05ld", (long) (now % 100000));
if (gethostname(hostname, sizeof(hostname)) < 0)
err(1, "gethostname");