projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
prepare to upload
[debian/amanda]
/
common-src
/
rsh-security.c
diff --git
a/common-src/rsh-security.c
b/common-src/rsh-security.c
index 26914c6845f1433b0a2445df54fe2a03155a969f..4d14f3bdfaa3755a0d715794802b340213e360ef 100644
(file)
--- a/
common-src/rsh-security.c
+++ b/
common-src/rsh-security.c
@@
-117,6
+117,7
@@
rsh_connect(
void * arg,
void * datap)
{
void * arg,
void * datap)
{
+ int result;
struct sec_handle *rh;
char *amandad_path=NULL, *client_username=NULL;
struct sec_handle *rh;
char *amandad_path=NULL, *client_username=NULL;
@@
-132,10
+133,12
@@
rsh_connect(
rh->ev_timeout = NULL;
rh->rc = NULL;
rh->ev_timeout = NULL;
rh->rc = NULL;
+ /* get the canonical hostname */
rh->hostname = NULL;
rh->hostname = NULL;
- if (
resolve_hostname(hostname, 0, NULL, &rh->hostname
) || rh->hostname == NULL) {
+ if (
(result = resolve_hostname(hostname, 0, NULL, &rh->hostname)
) || rh->hostname == NULL) {
security_seterror(&rh->sech,
security_seterror(&rh->sech,
- _("%s: could not resolve hostname"), hostname);
+ _("rsh_security could not find canonical name for '%s': %s"),
+ hostname, gai_strerror(result));
(*fn)(arg, &rh->sech, S_ERROR);
return;
}
(*fn)(arg, &rh->sech, S_ERROR);
return;
}