]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
writeconfig: emit error messages again in VerifyEntries
authorStephan Wiesand <stephan.wiesand@desy.de>
Tue, 17 Nov 2015 14:03:03 +0000 (15:03 +0100)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 18 Nov 2015 16:17:15 +0000 (11:17 -0500)
Before commit e4a8a7a38dbf29e89bc1a7b6b017447a6aa0c764 an error message
was printed if looking up a server hostname failed. Restore this, and
also print a message in the now detected case that the lookup returns
loopback addresses only.

Reviewed-on: http://gerrit.openafs.org/12097
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit f6247f90c9644d7a396531c219c585f705e0c251)

Change-Id: I6edc433cbbc8f2d8528501aa30b0aceafb85dbb6
Reviewed-on: http://gerrit.openafs.org/12105
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/auth/writeconfig.c

index 6581841b849bc73b0d845c7de3a6f29d892b3cad..24aaf05960eab4b583641d6b1ff54b26a9b4b52f 100644 (file)
@@ -62,6 +62,8 @@ VerifyEntries(struct afsconf_cell *aci)
 
                code = getaddrinfo(aci->hostName[i], NULL, &hints, &result);
                if (code) {
+                   printf("Host %s not found in host database...\n",
+                          aci->hostName[i]);
                    return AFSCONF_FAILURE;
                }
                for (rp = result; rp != NULL; rp = rp->ai_next) {
@@ -73,6 +75,8 @@ VerifyEntries(struct afsconf_cell *aci)
                }
                freeaddrinfo(result);
                if (aci->hostAddr[i].sin_addr.s_addr == 0) {
+                   printf("No non-loopback addresses found for host %s\n",
+                          aci->hostName[i]);
                    return AFSCONF_FAILURE;
                }
            }