return false;
}
- cout<<"This is a "<<DomainInfo::getKindString(di.kind)<<" zone"<<endl;
+ if (!di.account.empty()) {
+ cout<<"This zone is owned by "<<di.account<<endl;
+ }
- if(di.kind == DomainInfo::Master) {
- cout<<"Last SOA serial number we notified: "<<di.notified_serial<<" ";
- SOAData sd;
- if(B.getSOAUncached(zone, sd)) {
- if(sd.serial == di.notified_serial)
- cout<< "== ";
- else
- cout << "!= ";
- cout<<sd.serial<<" (serial in the database)"<<endl;
+ if (!exportDS) {
+ cout<<"This is a "<<DomainInfo::getKindString(di.kind)<<" zone"<<endl;
+ if(di.kind == DomainInfo::Master) {
+ cout<<"Last SOA serial number we notified: "<<di.notified_serial<<" ";
+ SOAData sd;
+ if(B.getSOAUncached(zone, sd)) {
+ if(sd.serial == di.notified_serial)
+ cout<< "== ";
+ else
+ cout << "!= ";
+ cout<<sd.serial<<" (serial in the database)"<<endl;
+ }
- else
- cout<<"- no serial found in database"<<endl;
}
- else
- cout<<"- no serial found in database"<<endl;
- }
- else if(di.kind == DomainInfo::Slave) {
- cout<<"Master"<<addS(di.masters)<<": ";
- for(const auto& m : di.masters)
- cout<<m<<" ";
- cout<<endl;
- struct tm tm;
- localtime_r(&di.last_check, &tm);
- char buf[80];
- if(di.last_check)
- strftime(buf, sizeof(buf)-1, "%a %F %H:%M:%S", &tm);
- else
- strncpy(buf, "Never", sizeof(buf)-1);
- buf[sizeof(buf)-1] = '\0';
- cout<<"Last time we got update from master: "<<buf<<endl;
- SOAData sd;
- if(B.getSOAUncached(zone, sd)) {
- cout<<"SOA serial in database: "<<sd.serial<<endl;
- cout<<"Refresh interval: "<<sd.refresh<<" seconds"<<endl;
+ else if(di.kind == DomainInfo::Slave) {
+ cout<<"Master"<<addS(di.masters)<<": ";
+ for(const auto& m : di.masters)
+ cout<<m<<" ";
+ cout<<endl;
+ struct tm tm;
+ localtime_r(&di.last_check, &tm);
+ char buf[80];
+ if(di.last_check)
+ strftime(buf, sizeof(buf)-1, "%a %F %H:%M:%S", &tm);
+ else
+ strncpy(buf, "Never", sizeof(buf)-1);
+ buf[sizeof(buf)-1] = '\0';
+ cout<<"Last time we got update from master: "<<buf<<endl;
+ SOAData sd;
+ if(B.getSOAUncached(zone, sd)) {
+ cout<<"SOA serial in database: "<<sd.serial<<endl;
+ cout<<"Refresh interval: "<<sd.refresh<<" seconds"<<endl;
+ }
+ else
+ cout<<"No SOA serial found in database"<<endl;
}
- else
- cout<<"No SOA serial found in database"<<endl;
}
-
if(!dk.isSecuredZone(zone)) {
- cout<<"Zone is not actively secured"<<endl;
+ auto &outstream = (exportDS ? cerr : cout);
+ outstream << "Zone is not actively secured" << endl;
+ if (exportDS) {
+ // it does not make sense to proceed here, and it might be useful
+ // for scripts to know that something is odd here
+ return false;
+ }
}
+
NSEC3PARAMRecordContent ns3pr;
bool narrow;
bool haveNSEC3=dk.getNSEC3PARAM(zone, &ns3pr, &narrow);