1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

logging improvement

This commit is contained in:
Nicolas Viennot 2019-10-09 17:31:29 -04:00
parent 2bd232c982
commit 5c2c1c2584
2 changed files with 4 additions and 4 deletions

View File

@ -370,7 +370,7 @@ static void jail(void)
gid = pw->pw_gid; gid = pw->pw_gid;
if (getuid() != 0) if (getuid() != 0)
tmate_fatal("Need root privileges"); tmate_fatal("Need root privileges to create the jail");
if (chroot(TMATE_WORKDIR "/jail") < 0) if (chroot(TMATE_WORKDIR "/jail") < 0)
tmate_fatal("Cannot chroot()"); tmate_fatal("Cannot chroot()");

View File

@ -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); sprintf(path, "%s/%s", keys_dir, name);
if (access(path, F_OK) < 0) { if (access(path, F_OK) < 0)
tmate_warn("Skipping host key %s", path);
return; return;
}
tmate_notice("Loading key %s", path);
ssh_pki_import_privkey_file(path, NULL, NULL, NULL, &key); ssh_pki_import_privkey_file(path, NULL, NULL, NULL, &key);
ssh_bind_options_set(bind, SSH_BIND_OPTIONS_IMPORT_KEY, key); ssh_bind_options_set(bind, SSH_BIND_OPTIONS_IMPORT_KEY, key);