From: Bert Hubert Date: Thu, 6 Jan 2011 14:52:10 +0000 (+0000) Subject: make pdnssec output useful help X-Git-Tag: auth-3.0~431 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f28f232460464ada83a0e901240fb361fb0b725f;p=pdns make pdnssec output useful help rename order-zone to rectify-zone and make it also set the 'auth' field plus make it clear the order field for narrow nsec3 zones git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1816 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/backends/bind/bindbackend2.cc b/pdns/backends/bind/bindbackend2.cc index ef61538cc..0709e130c 100644 --- a/pdns/backends/bind/bindbackend2.cc +++ b/pdns/backends/bind/bindbackend2.cc @@ -1,6 +1,6 @@ /* PowerDNS Versatile Database Driven Nameserver - Copyright (C) 2002 - 2010 PowerDNS.COM BV + Copyright (C) 2002 - 2011 PowerDNS.COM BV This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 9c2b21125..bed722845 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -85,43 +85,56 @@ void loadMainConfig(const std::string& configdir) UeberBackend::go(); } -void orderZone(DNSSECKeeper& dk, const std::string& zone) +void rectifyZone(DNSSECKeeper& dk, const std::string& zone) { - UeberBackend* B = new UeberBackend("default"); SOAData sd; if(!B->getSOA(zone, sd)) { - cerr<<"No SOA!"<list(zone, sd.domain_id); DNSResourceRecord rr; - set qnames; + set qnames, nsset; while(sd.db->get(rr)) { - // cerr<updateDNSSECOrderAndAuth(sd.domain_id, zone, qname, true); + sd.db->updateDNSSECOrderAndAuth(sd.domain_id, zone, qname, auth); else { - hashed=toLower(toBase32Hex(hashQNameWithSalt(ns3pr.d_iterations, ns3pr.d_salt, qname))); - cerr<<"'"< '"<< hashed <<"'"<updateDNSSECOrderAndAuthAbsolute(sd.domain_id, qname, hashed, true); + if(!narrow) { + hashed=toLower(toBase32Hex(hashQNameWithSalt(ns3pr.d_iterations, ns3pr.d_salt, qname))); + cerr<<"'"< '"<< hashed <<"'"<updateDNSSECOrderAndAuthAbsolute(sd.domain_id, qname, hashed, auth); } } cerr<<"Done listing"< >(); if(cmds.empty() || g_vm.count("help")) { - cerr<<"Usage: \npdnssec [options] [show-zone] [secure-zone] [alter-zone] [order-zone] [add-zone-key] [deactivate-zone-key] [remove-zone-key] [activate-zone-key]\n"; - cerr<<" [import-zone-key] [export-zone-key] [set-nsec3] [unset-nsec3] [export-zone-dnskey]"<