[PATCH] prevent unnecessary 'Failed loading' warning if -R is used

Steven Honeyman stevenhoneyman at gmail.com
Thu Sep 25 07:52:09 WST 2014


If keys are set to be generated when the first connection is made,
then a message saying "Failed" looks bad. This change only shows the
warning if -R is either not used at runtime, or if it's not compiled
in.

(apologies for using git format-patch... I've never used mercurial,
and figured this was trivial enough to post as-is)


Signed-off-by: Steven Honeyman <stevenhoneyman at gmail.com>

---
 svr-runopts.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/svr-runopts.c b/svr-runopts.c
index 8380de3..f285ab7 100644
--- a/svr-runopts.c
+++ b/svr-runopts.c
@@ -410,6 +410,9 @@ static void loadhostkey(const char *keyfile, int
fatal_duplicate) {
     sign_key * read_key = new_sign_key();
     enum signkey_type type = DROPBEAR_SIGNKEY_ANY;
     if (readhostkey(keyfile, read_key, &type) == DROPBEAR_FAILURE) {
+#ifdef DROPBEAR_DELAY_HOSTKEY
+        if (!svr_opts.delay_hostkey)
+#endif
         dropbear_log(LOG_WARNING, "Failed loading %s", keyfile);
     }

-- 
2.1.0


More information about the Dropbear mailing list