Commit 7b41be2b authored by Niels Möller's avatar Niels Möller
Browse files

Minor fixes.

Rev: src/lsh.c:1.43
Rev: src/lshd.c:1.38
parent d02719e8
......@@ -120,6 +120,7 @@ int main(int argc, char **argv)
/* int term_width, term_height, term_width_pix, term_height_pix; */
int not;
#if WITH_PTY_SUPPORT
int tty;
int use_pty = -1; /* Means default */
#endif /* WITH_PTY_SUPPORT */
......@@ -127,8 +128,6 @@ int main(int argc, char **argv)
int lsh_exit_code;
int tty;
struct sockaddr_in remote;
struct randomness *r;
......
......@@ -292,6 +292,7 @@ int main(int argc, char **argv)
{
char *host = NULL; /* Interface to bind */
char *port = "ssh";
/* TODO: this should probably use sysconfdir */
char *hostkey = "/etc/lsh_host_key";
#if WITH_SSH1_FALLBACK
......@@ -415,15 +416,30 @@ int main(int argc, char **argv)
/* Read the hostkey */
if (!read_host_key(hostkey, &public_key, &secret_key, r))
{
werror("lshd: Could not read hostkey.\n");
return EXIT_FAILURE;
}
if (!get_inaddr(&local, host, port, "tcp"))
{
fprintf(stderr, "No such host or service");
werror("lshd: No such host or service.\n");
return EXIT_FAILURE;
}
#if 0
#ifdef HAVE_SYSLOG
{
int option = LOG_PID | LOG_CONS;
if (foreground_flag)
{
option |= LOG_PERROR;
}
openlog("lshd", option, LOG_DAEMON);
syslog_flag = 1;
}
#endif /* HAVE_SYSLOG */
#endif
init_backend(backend);
reaper = make_reaper();
......@@ -481,7 +497,8 @@ int main(int argc, char **argv)
r, make_kexinit,
kexinit_handler)))
{
werror("lsh: Connection failed: %z\n", strerror(errno));
werror("lshd: listen() failed: (errno = %i): %z\n",
errno, strerror(errno));
return 1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment