Handle case of --auth-zone but no --auth-server.

This commit is contained in:
Simon Kelley
2018-08-04 21:04:59 +01:00
parent 1682d15a74
commit 397c0502e2
2 changed files with 2 additions and 5 deletions

View File

@@ -216,7 +216,7 @@ int main (int argc, char **argv)
#endif #endif
#ifndef HAVE_AUTH #ifndef HAVE_AUTH
if (daemon->authserver) if (daemon->authserver || daemon->auth_zones)
die(_("authoritative DNS not available: set HAVE_AUTH in src/config.h"), NULL, EC_BADCONF); die(_("authoritative DNS not available: set HAVE_AUTH in src/config.h"), NULL, EC_BADCONF);
#endif #endif
@@ -236,7 +236,7 @@ int main (int argc, char **argv)
now = dnsmasq_time(); now = dnsmasq_time();
/* Create a serial at startup if not configured. */ /* Create a serial at startup if not configured. */
if (daemon->authinterface && daemon->soa_sn == 0) if (daemon->auth_zones && daemon->soa_sn == 0)
#ifdef HAVE_BROKEN_RTC #ifdef HAVE_BROKEN_RTC
die(_("zone serial must be configured in --auth-soa"), NULL, EC_BADCONF); die(_("zone serial must be configured in --auth-soa"), NULL, EC_BADCONF);
#else #else

View File

@@ -1895,8 +1895,6 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
break; break;
} }
#ifdef HAVE_AUTH
case LOPT_AUTHSERV: /* --auth-server */ case LOPT_AUTHSERV: /* --auth-server */
if (!(comma = split(arg))) if (!(comma = split(arg)))
ret_err(gen_err); ret_err(gen_err);
@@ -2071,7 +2069,6 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
} }
break; break;
#endif
case 's': /* --domain */ case 's': /* --domain */
case LOPT_SYNTH: /* --synth-domain */ case LOPT_SYNTH: /* --synth-domain */