From 5c2c1c2584f7203585e5357ee6673d4f9f1e3a52 Mon Sep 17 00:00:00 2001 From: Nicolas Viennot Date: Wed, 9 Oct 2019 17:31:29 -0400 Subject: [PATCH] logging improvement --- tmate-main.c | 2 +- tmate-ssh-server.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tmate-main.c b/tmate-main.c index 95e1201d..eec8bdca 100644 --- a/tmate-main.c +++ b/tmate-main.c @@ -370,7 +370,7 @@ static void jail(void) gid = pw->pw_gid; if (getuid() != 0) - tmate_fatal("Need root privileges"); + tmate_fatal("Need root privileges to create the jail"); if (chroot(TMATE_WORKDIR "/jail") < 0) tmate_fatal("Cannot chroot()"); diff --git a/tmate-ssh-server.c b/tmate-ssh-server.c index 65ad1727..6348b1f6 100644 --- a/tmate-ssh-server.c +++ b/tmate-ssh-server.c @@ -400,10 +400,10 @@ static void ssh_import_key(ssh_bind bind, const char *keys_dir, const char *name sprintf(path, "%s/%s", keys_dir, name); - if (access(path, F_OK) < 0) { - tmate_warn("Skipping host key %s", path); + if (access(path, F_OK) < 0) return; - } + + tmate_notice("Loading key %s", path); ssh_pki_import_privkey_file(path, NULL, NULL, NULL, &key); ssh_bind_options_set(bind, SSH_BIND_OPTIONS_IMPORT_KEY, key);