diff options
author | Matt Johnston <matt@ucc.asn.au> | 2020-10-15 19:55:15 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2020-10-15 19:55:15 +0800 |
commit | 0e3e8db5bfca0c579be55e7580a46c593c1384be (patch) | |
tree | 2b1a718f633fb95c1f2d689a591cf9e8642697f3 /cli-main.c | |
parent | 78e17f6ee9a944430da3e517ee1fe384fd6b275b (diff) | |
parent | 17873e8c922eded2cec86184673a6d110df6403f (diff) |
merge from main
--HG--
branch : fuzz
Diffstat (limited to 'cli-main.c')
-rw-r--r-- | cli-main.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -106,6 +106,7 @@ static void cli_dropbear_exit(int exitcode, const char* format, va_list param) { /* Render the formatted exit message */ vsnprintf(exitmsg, sizeof(exitmsg), format, param); + TRACE(("Exited, cleaning up: %s", exitmsg)) /* Add the prefix depending on session/auth state */ if (!ses.init_done) { @@ -130,6 +131,12 @@ static void cli_dropbear_log(int priority, const char* format, va_list param) { char printbuf[1024]; + const char *name; + + name = cli_opts.progname; + if (!name) { + name = "dbclient"; + } vsnprintf(printbuf, sizeof(printbuf), format, param); @@ -139,7 +146,7 @@ static void cli_dropbear_log(int priority, } #endif - fprintf(stderr, "%s: %s\n", cli_opts.progname, printbuf); + fprintf(stderr, "%s: %s\n", name, printbuf); fflush(stderr); } |