diff --git a/Dockerfile b/Dockerfile index 584f9ea1..fd8c3ba1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ RUN set -ex; \ ### Minimal run-time image FROM alpine:3.9 -RUN apk add --no-cache msgpack-c ncurses-libs libevent libexecinfo openssl zlib +RUN apk add --no-cache msgpack-c ncurses-libs libevent libexecinfo openssl zlib gdb bash COPY --from=build /usr/lib/libssh.so.* /usr/lib/ COPY --from=build /usr/bin/tmate-ssh-server /usr/bin/ diff --git a/server.c b/server.c index 4139ef51..05077366 100644 --- a/server.c +++ b/server.c @@ -222,7 +222,8 @@ server_loop(void) * This causes an infinite loop. * The following check is a workaround to avoid the infinite loop. */ - tmate_fatal("SSH socket not connected, but socket close wasn't detected"); + tmate_info("SSH socket not connected, but socket close wasn't detected"); + request_server_termination(); } if (!tmate_server_request_exit) diff --git a/tmate-daemon-decoder.c b/tmate-daemon-decoder.c index 9d93b7a6..20ce1592 100644 --- a/tmate-daemon-decoder.c +++ b/tmate-daemon-decoder.c @@ -45,7 +45,7 @@ static void tmate_header(struct tmate_session *session, session->daemon_encoder.mpac_version = 4; } - tmate_info("Daemon header: version=%s, protocol=%d", + tmate_info("tmate version=%s, protocol=%d", session->client_version, session->client_protocol_version); if (tmate_has_websocket()) { diff --git a/tmate-main.c b/tmate-main.c index 071a0af2..86560ecb 100644 --- a/tmate-main.c +++ b/tmate-main.c @@ -174,7 +174,7 @@ char *get_socket_path(const char *_token) for (char *c = token; *c; c++) { if (*c == '/' || *c == '.') - *c = '_'; + *c = '='; } xasprintf(&path, TMATE_WORKDIR "/sessions/%s", token); diff --git a/tmate-ssh-daemon.c b/tmate-ssh-daemon.c index 7d631e97..371948b8 100644 --- a/tmate-ssh-daemon.c +++ b/tmate-ssh-daemon.c @@ -156,8 +156,7 @@ void tmate_spawn_daemon(struct tmate_session *session) set_session_token(session, token); free(token); - tmate_info("Spawning daemon username=%s ip=%s", - client->username, client->ip_address); + tmate_info("Spawning daemon ip=%s", client->ip_address); session->tmux_socket_fd = server_create_socket(); if (session->tmux_socket_fd < 0)