Hi tech@

This makes the tear down of ssh control masters better play with shell scripts that are run by cron. If nothing unexpected happens and in quiet mode, then don't echo back the command that is being requested.


-Tim


Index: mux.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/mux.c,v
retrieving revision 1.62
diff -u -p -r1.62 mux.c
--- mux.c       30 Sep 2016 09:19:13 -0000      1.62
+++ mux.c       16 Oct 2016 18:18:53 -0000
@@ -2212,7 +2212,8 @@ muxclient(const char *path)
                exit(0);
        case SSHMUX_COMMAND_TERMINATE:
                mux_client_request_terminate(sock);
-               fprintf(stderr, "Exit request sent.\r\n");
+               if (options.log_level != SYSLOG_LEVEL_QUIET)
+                       fprintf(stderr, "Exit request sent.\r\n");
                exit(0);
        case SSHMUX_COMMAND_FORWARD:
                if (mux_client_forwards(sock, 0) != 0)
@@ -2230,7 +2231,8 @@ muxclient(const char *path)
                exit(0);
        case SSHMUX_COMMAND_STOP:
                mux_client_request_stop_listening(sock);
-               fprintf(stderr, "Stop listening request sent.\r\n");
+               if (options.log_level != SYSLOG_LEVEL_QUIET)
+                       fprintf(stderr, "Stop listening request sent.\r\n");
                exit(0);
        case SSHMUX_COMMAND_CANCEL_FWD:
                if (mux_client_forwards(sock, 1) != 0)

Reply via email to