summaryrefslogtreecommitdiff
path: root/usr.bin/rsync
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-02-16 16:50:10 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-02-16 16:50:10 +0000
commit768e613d9211b1f485fd92b6a947fd8634b0c7f2 (patch)
tree93db0334a2dbba31a9cb46596ee5cb655e3b7e39 /usr.bin/rsync
parent5a2a6c7234a54b0954844bbc65fc9b62143f8ac9 (diff)
getaddrinfo doesn't imply "DNS", borrow terminology from ssh
ok benno
Diffstat (limited to 'usr.bin/rsync')
-rw-r--r--usr.bin/rsync/socket.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.bin/rsync/socket.c b/usr.bin/rsync/socket.c
index 95635afa377..1edaba34421 100644
--- a/usr.bin/rsync/socket.c
+++ b/usr.bin/rsync/socket.c
@@ -1,4 +1,4 @@
-/* $Id: socket.c,v 1.9 2019/02/16 10:48:05 florian Exp $ */
+/* $Id: socket.c,v 1.10 2019/02/16 16:50:09 deraadt Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -121,12 +121,15 @@ inet_resolve(struct sess *sess, const char *host, size_t *sz)
LOG2(sess, "resolving: %s", host);
if (error == EAI_AGAIN || error == EAI_NONAME) {
- ERRX(sess, "DNS resolve error: %s: %s",
+ ERRX(sess, "Could not resolve hostname %s: %s",
host, gai_strerror(error));
return NULL;
+ } else if (error == EAI_SERVICE) {
+ ERRX(sess, "Could not resolve service rsync: %s",
+ gai_strerror(error));
+ return NULL;
} else if (error) {
- ERRX(sess, "DNS parse error: %s: %s",
- host, gai_strerror(error));
+ ERRX(sess, "getaddrinfo: %s: %s", host, gai_strerror(error));
return NULL;
}
@@ -177,7 +180,7 @@ inet_resolve(struct sess *sess, const char *host, size_t *sz)
src[i].ip, INET6_ADDRSTRLEN);
}
- LOG2(sess, "DNS resolved: %s: %s", host, src[i].ip);
+ LOG2(sess, "hostname resolved: %s: %s", host, src[i].ip);
i++;
}