static isc_result_t do_version_lookup(dns_sdblookup_t *lookup) { if (ns_g_server->version_set) { if (ns_g_server->version == NULL) return (ISC_R_SUCCESS); else return (put_txt(lookup, ns_g_server->version)); } else { return (put_txt(lookup, ns_g_version)); } }
static isc_result_t do_hostname_lookup(dns_sdblookup_t *lookup) { if (ns_g_server->hostname_set) { if (ns_g_server->hostname == NULL) return (ISC_R_SUCCESS); else return (put_txt(lookup, ns_g_server->hostname)); } else { char buf[256]; isc_result_t result = ns_os_gethostname(buf, sizeof(buf)); if (result != ISC_R_SUCCESS) return (result); return (put_txt(lookup, buf)); } }
static isc_result_t do_authors_lookup(dns_sdblookup_t *lookup) { isc_result_t result; const char **p; static const char *authors[] = { "Mark Andrews", "James Brister", "Ben Cottrell", "Michael Graff", "Andreas Gustafsson", "Bob Halley", "David Lawrence", "Danny Mayer", "Damien Neil", "Matt Nelson", "Michael Sawyer", "Brian Wellington", NULL }; /* * If a version string is specified, disable the authors.bind zone. */ if (ns_g_server->version_set) return (ISC_R_SUCCESS); for (p = authors; *p != NULL; p++) { result = put_txt(lookup, *p); if (result != ISC_R_SUCCESS) return (result); } return (ISC_R_SUCCESS); }