X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Frsh-security.c;h=4d14f3bdfaa3755a0d715794802b340213e360ef;hb=3469241adf5f8b45020b0896ee13d17c4c7a2abf;hp=26914c6845f1433b0a2445df54fe2a03155a969f;hpb=94a044f90357edefa6f4ae9f0b1d5885b0e34aee;p=debian%2Famanda diff --git a/common-src/rsh-security.c b/common-src/rsh-security.c index 26914c6..4d14f3b 100644 --- a/common-src/rsh-security.c +++ b/common-src/rsh-security.c @@ -117,6 +117,7 @@ rsh_connect( void * arg, void * datap) { + int result; struct sec_handle *rh; char *amandad_path=NULL, *client_username=NULL; @@ -132,10 +133,12 @@ rsh_connect( rh->ev_timeout = NULL; rh->rc = NULL; + /* get the canonical hostname */ 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, - _("%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; }