Skip to content
Snippets Groups Projects
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
Branches
Tags
No related merge requests found
...@@ -120,6 +120,7 @@ int main(int argc, char **argv) ...@@ -120,6 +120,7 @@ int main(int argc, char **argv)
/* int term_width, term_height, term_width_pix, term_height_pix; */ /* int term_width, term_height, term_width_pix, term_height_pix; */
int not; int not;
#if WITH_PTY_SUPPORT #if WITH_PTY_SUPPORT
int tty;
int use_pty = -1; /* Means default */ int use_pty = -1; /* Means default */
#endif /* WITH_PTY_SUPPORT */ #endif /* WITH_PTY_SUPPORT */
...@@ -127,8 +128,6 @@ int main(int argc, char **argv) ...@@ -127,8 +128,6 @@ int main(int argc, char **argv)
int lsh_exit_code; int lsh_exit_code;
int tty;
struct sockaddr_in remote; struct sockaddr_in remote;
struct randomness *r; struct randomness *r;
......
...@@ -292,6 +292,7 @@ int main(int argc, char **argv) ...@@ -292,6 +292,7 @@ int main(int argc, char **argv)
{ {
char *host = NULL; /* Interface to bind */ char *host = NULL; /* Interface to bind */
char *port = "ssh"; char *port = "ssh";
/* TODO: this should probably use sysconfdir */
char *hostkey = "/etc/lsh_host_key"; char *hostkey = "/etc/lsh_host_key";
#if WITH_SSH1_FALLBACK #if WITH_SSH1_FALLBACK
...@@ -415,15 +416,30 @@ int main(int argc, char **argv) ...@@ -415,15 +416,30 @@ int main(int argc, char **argv)
/* Read the hostkey */ /* Read the hostkey */
if (!read_host_key(hostkey, &public_key, &secret_key, r)) if (!read_host_key(hostkey, &public_key, &secret_key, r))
{ {
werror("lshd: Could not read hostkey.\n");
return EXIT_FAILURE; return EXIT_FAILURE;
} }
if (!get_inaddr(&local, host, port, "tcp")) 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; 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); init_backend(backend);
reaper = make_reaper(); reaper = make_reaper();
...@@ -481,7 +497,8 @@ int main(int argc, char **argv) ...@@ -481,7 +497,8 @@ int main(int argc, char **argv)
r, make_kexinit, r, make_kexinit,
kexinit_handler))) kexinit_handler)))
{ {
werror("lsh: Connection failed: %z\n", strerror(errno)); werror("lshd: listen() failed: (errno = %i): %z\n",
errno, strerror(errno));
return 1; return 1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment