summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/ssh-keygen.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2015-01-16 15:55:08 +0000
committerDamien Miller <djm@cvs.openbsd.org>2015-01-16 15:55:08 +0000
commit34bed40f0e4ffac75a5a56d6df45e6d50c363934 (patch)
treeaf78de2fc4dbb288928ec879475e74696ccdfd64 /usr.bin/ssh/ssh-keygen.c
parent3277a6d21dea172a2276bc730820ea00213812cb (diff)
regression: incorrect error message on otherwise-successful
ssh-keygen -A. Reported by Dmitry Orlov, via deraadt@
Diffstat (limited to 'usr.bin/ssh/ssh-keygen.c')
-rw-r--r--usr.bin/ssh/ssh-keygen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c
index d1337927b4b..30e02b8e26c 100644
--- a/usr.bin/ssh/ssh-keygen.c
+++ b/usr.bin/ssh/ssh-keygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.253 2015/01/16 06:40:12 deraadt Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.254 2015/01/16 15:55:07 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -991,8 +991,8 @@ do_gen_all_hostkeys(struct passwd *pw)
first = 0;
continue;
}
- if (!sshkey_write(public, f)) {
- fprintf(stderr, "write key failed\n");
+ if ((r = sshkey_write(public, f)) != 0) {
+ fprintf(stderr, "write key failed: %s\n", ssh_err(r));
fclose(f);
sshkey_free(public);
first = 0;