summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2000-01-05 08:32:43 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2000-01-05 08:32:43 +0000
commit3d9b166ec3bea657f46fe34efd2deca7cc331e90 (patch)
tree0487fccb27fd5861c11a04cc8f1623625d431650
parente85794bac08000931063e553cbb71d8f620baa5d (diff)
better error message
-rw-r--r--usr.bin/ssh/sshconnect.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c
index dbccb1e7f09..15db438c705 100644
--- a/usr.bin/ssh/sshconnect.c
+++ b/usr.bin/ssh/sshconnect.c
@@ -8,7 +8,7 @@
*/
#include "includes.h"
-RCSID("$Id: sshconnect.c,v 1.49 2000/01/04 00:08:00 markus Exp $");
+RCSID("$Id: sshconnect.c,v 1.50 2000/01/05 08:32:42 markus Exp $");
#include <ssl/bn.h>
#include "xmalloc.h"
@@ -29,6 +29,7 @@ RCSID("$Id: sshconnect.c,v 1.49 2000/01/04 00:08:00 markus Exp $");
unsigned char session_id[16];
extern Options options;
+extern char *__progname;
/*
* Connect to the given ssh server using a proxy command.
@@ -208,7 +209,8 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
hints.ai_socktype = SOCK_STREAM;
snprintf(strport, sizeof strport, "%d", port);
if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0)
- fatal("Bad host name: %.100s (%s)", host, gai_strerror(gaierr));
+ fatal("%s: %.100s: %s", __progname, host,
+ gai_strerror(gaierr));
/*
* Try to connect several times. On some machines, the first time