# HG changeset patch # User Matt Johnston # Date 1458055411 -28800 # Node ID a20b6af6f182f4de702d99afdafdcff9bdb554ad # Parent c8f52c19e949b344fc2aec165bf96340a8d8fe53# Parent c792271027ebf4744dc72d760c99552173a9ccef merge diff -r c792271027eb -r a20b6af6f182 CHANGES --- a/CHANGES Tue Mar 15 21:55:11 2016 +0800 +++ b/CHANGES Tue Mar 15 23:23:31 2016 +0800 @@ -1,3 +1,22 @@ +- Fix crash when fallback initshells() is used, reported by Michael Nowak and Mike Tzou + +- Support syslog in dbclient, option -o usesyslog=yes. Patch from Konstantin Tokarev + +- Kill a proxycommand when dbclient exits, patch from Konstantin Tokarev + +- Option to exit when a TCP forward fails, patch from Konstantin Tokarev + +- New "-o" option parsing from Konstantin Tokarev. This allows handling some extra options + in the style of OpenSSH, though implementing all OpenSSH options is not planned. + +- Various cleanups for issues found by a lint tool, patch from Francois Perrad + +- Allow specifying commands eg "dropbearmulti dbclient ..." instead of symlinks + +- Fix tab indent consistency, patch from Francois Perrad + +- Fix issues found by cppcheck, reported by Mike Tzou + 2016.72 - 9 March 2016 - Validate X11 forwarding input. Could allow bypass of authorized_keys command= restrictions, diff -r c792271027eb -r a20b6af6f182 cli-kex.c --- a/cli-kex.c Tue Mar 15 21:55:11 2016 +0800 +++ b/cli-kex.c Tue Mar 15 23:23:31 2016 +0800 @@ -186,7 +186,7 @@ char* fp = NULL; FILE *tty = NULL; - char response = 'z'; + int response = 'z'; fp = sign_key_fingerprint(keyblob, keybloblen); if (cli_opts.always_accept_key) { diff -r c792271027eb -r a20b6af6f182 cli-session.c --- a/cli-session.c Tue Mar 15 21:55:11 2016 +0800 +++ b/cli-session.c Tue Mar 15 23:23:31 2016 +0800 @@ -361,9 +361,10 @@ /* Set std{in,out,err} back to non-blocking - busybox ash dies nastily if * we don't revert the flags */ - fcntl(cli_ses.stdincopy, F_SETFL, cli_ses.stdinflags); - fcntl(cli_ses.stdoutcopy, F_SETFL, cli_ses.stdoutflags); - fcntl(cli_ses.stderrcopy, F_SETFL, cli_ses.stderrflags); + /* Ignore return value since there's nothing we can do */ + (void)fcntl(cli_ses.stdincopy, F_SETFL, cli_ses.stdinflags); + (void)fcntl(cli_ses.stdoutcopy, F_SETFL, cli_ses.stdoutflags); + (void)fcntl(cli_ses.stderrcopy, F_SETFL, cli_ses.stderrflags); cli_tty_cleanup(); diff -r c792271027eb -r a20b6af6f182 loginrec.c --- a/loginrec.c Tue Mar 15 21:55:11 2016 +0800 +++ b/loginrec.c Tue Mar 15 23:23:31 2016 +0800 @@ -305,21 +305,6 @@ li->tv_usec = tv.tv_usec; } -/* copy a sockaddr_* into our logininfo */ -void -login_set_addr(struct logininfo *li, const struct sockaddr *sa, - const unsigned int sa_size) -{ - unsigned int bufsize = sa_size; - - /* make sure we don't overrun our union */ - if (sizeof(li->hostaddr) < sa_size) - bufsize = sizeof(li->hostaddr); - - memcpy((void *)&(li->hostaddr.sa), (const void *)sa, bufsize); -} - - /** ** login_write: Call low-level recording functions based on autoconf ** results diff -r c792271027eb -r a20b6af6f182 loginrec.h --- a/loginrec.h Tue Mar 15 21:55:11 2016 +0800 +++ b/loginrec.h Tue Mar 15 23:23:31 2016 +0800 @@ -173,10 +173,6 @@ int login_write (struct logininfo *li); int login_log_entry(struct logininfo *li); -/* set the network address based on network address type */ -void login_set_addr(struct logininfo *li, const struct sockaddr *sa, - const unsigned int sa_size); - /* produce various forms of the line filename */ char *line_fullname(char *dst, const char *src, size_t dstsize); char *line_stripname(char *dst, const char *src, size_t dstsize); diff -r c792271027eb -r a20b6af6f182 signkey.c --- a/signkey.c Tue Mar 15 21:55:11 2016 +0800 +++ b/signkey.c Tue Mar 15 23:23:31 2016 +0800 @@ -93,7 +93,7 @@ } #endif - return i; + return (enum signkey_type)i; } } diff -r c792271027eb -r a20b6af6f182 svr-kex.c --- a/svr-kex.c Tue Mar 15 21:55:11 2016 +0800 +++ b/svr-kex.c Tue Mar 15 23:23:31 2016 +0800 @@ -138,7 +138,7 @@ break; #endif default: - (void)0; + dropbear_assert(0); } if (readhostkey(fn, svr_opts.hostkey, &type) == DROPBEAR_SUCCESS) { diff -r c792271027eb -r a20b6af6f182 svr-x11fwd.c --- a/svr-x11fwd.c Tue Mar 15 21:55:11 2016 +0800 +++ b/svr-x11fwd.c Tue Mar 15 23:23:31 2016 +0800 @@ -119,7 +119,7 @@ /* cleanup */ m_free(chansess->x11authprot); m_free(chansess->x11authcookie); - close(fd); + m_close(fd); return DROPBEAR_FAILURE; }