]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: remove old aliasses
authorKees Monshouwer <mind04@monshouwer.org>
Mon, 10 Jul 2023 14:57:03 +0000 (16:57 +0200)
committermind04 <mind04@monshouwer.org>
Mon, 13 Nov 2023 17:00:10 +0000 (18:00 +0100)
16 files changed:
docs/manpages/zone2sql.1.rst
pdns/auth-main.cc
pdns/pdnsutil.cc
pdns/zone2sql.cc
regression-tests.auth-py/test_IXFR.py
regression-tests.auth-py/test_XFRIncomplete.py
regression-tests.nobackend/supermaster-signed/command
regression-tests.nobackend/supermaster-unsigned/command
regression-tests/backends/bind-master
regression-tests/backends/bind-slave
regression-tests/backends/godbc_mssql-slave
regression-tests/backends/godbc_sqlite3-master
regression-tests/backends/gpgsql-slave
regression-tests/backends/gsql-common
regression-tests/backends/gsqlite3-slave
regression-tests/backends/lmdb-master

index 77be30811aaf94d49b782a8e3a57c9ef023bd845..92beab49c54478facafa46a8110d7e3fd09722d1 100644 (file)
@@ -66,7 +66,7 @@ OTHER Options
     List all options
 --on-error-resume-next
     Ignore missing zone files during parsing. Dangerous.
---slave
+--secondary
     Maintain slave status of zones listed in named.conf as being slaves.
     The default behaviour is to convert all zones to native operation.
 --verbose
index e148cb8735e329f05d6f5a74f7b98ba5cbf7d426..56196be5349f3e0b2f8eae5b739055ecc410f05a 100644 (file)
@@ -165,7 +165,6 @@ static void declareArguments()
   ::arg().set("proxy-protocol-maximum-size", "The maximum size of a proxy protocol payload, including the TLV values") = "512";
   ::arg().setSwitch("send-signed-notify", "Send TSIG secured NOTIFY if TSIG key is configured for a zone") = "yes";
   ::arg().set("allow-unsigned-notify", "Allow unsigned notifications for TSIG secured zones") = "yes"; // FIXME: change to 'no' later
-  ::arg().set("allow-unsigned-supermaster", "Allow supermasters to create zones without TSIG signed NOTIFY") = "yes";
   ::arg().set("allow-unsigned-autoprimary", "Allow autoprimaries to create zones without TSIG signed NOTIFY") = "yes";
   ::arg().setSwitch("forward-dnsupdate", "A global setting to allow DNS update packages that are for a Secondary zone, to be forwarded to the primary.") = "yes";
   ::arg().setSwitch("log-dns-details", "If PDNS should log DNS non-erroneous details") = "no";
@@ -212,7 +211,6 @@ static void declareArguments()
   ::arg().set("only-notify", "Only send AXFR NOTIFY to these IP addresses or netmasks") = "0.0.0.0/0,::/0";
   ::arg().set("also-notify", "When notifying a zone, also notify these nameservers") = "";
   ::arg().set("allow-notify-from", "Allow AXFR NOTIFY from these IP ranges. If empty, drop all incoming notifies.") = "0.0.0.0/0,::/0";
-  ::arg().set("slave-cycle-interval", "Schedule secondary freshness checks once every .. seconds") = "";
   ::arg().set("xfr-cycle-interval", "Schedule primary/secondary SOA freshness checks once every .. seconds") = "60";
   ::arg().set("secondary-check-signature-freshness", "Check signatures in SOA freshness check. Sets DO flag on SOA queries. Outside some very problematic scenarios, say yes here.") = "yes";
 
@@ -221,12 +219,9 @@ static void declareArguments()
   ::arg().set("tcp-control-secret", "If set, PowerDNS can be controlled over TCP after passing this secret") = "";
   ::arg().set("tcp-control-range", "If set, remote control of PowerDNS is possible over these networks only") = "127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fe80::/10";
 
-  ::arg().setSwitch("slave", "Act as a secondary") = "no";
   ::arg().setSwitch("secondary", "Act as a secondary") = "no";
-  ::arg().setSwitch("master", "Act as a primary") = "no";
   ::arg().setSwitch("primary", "Act as a primary") = "no";
-  ::arg().setSwitch("superslave", "Act as a autosecondary") = "no";
-  ::arg().setSwitch("autosecondary", "Act as an autosecondary (formerly superslave)") = "no";
+  ::arg().setSwitch("autosecondary", "Act as an autosecondary") = "no";
   ::arg().setSwitch("disable-axfr-rectify", "Disable the rectify step during an outgoing AXFR. Only required for regression testing.") = "no";
   ::arg().setSwitch("guardian", "Run within a guardian process") = "no";
   ::arg().setSwitch("prevent-self-notification", "Don't send notifications to what we think is ourself") = "yes";
@@ -266,7 +261,6 @@ static void declareArguments()
   ::arg().set("zone-metadata-cache-ttl", "Seconds to cache zone metadata from the database") = "60";
 
   ::arg().set("trusted-notification-proxy", "IP address of incoming notification proxy") = "";
-  ::arg().set("slave-renotify", "If we should send out notifications for secondaried updates") = "no";
   ::arg().set("secondary-do-renotify", "If this secondary should send out notifications after receiving zone transfers from a primary") = "no";
   ::arg().set("forward-notify", "IP addresses to forward received notifications to regardless of primary or secondary settings") = "";
 
@@ -1242,34 +1236,11 @@ int main(int argc, char** argv)
         g_log << Logger::Error << "Unknown logging facility " << ::arg().asNum("logging-facility") << endl;
     }
 
-    if (::arg().mustDo("master"))
-      ::arg().set("primary") = "yes";
-    if (::arg().mustDo("slave"))
-      ::arg().set("secondary") = "yes";
-    if (::arg().mustDo("slave-renotify"))
-      ::arg().set("secondary-do-renotify") = "yes";
-    if (::arg().mustDo("superslave"))
-      ::arg().set("autosecondary") = "yes";
-    if (::arg().mustDo("allow-unsigned-supermaster"))
-      ::arg().set("allow-unsigned-autoprimary") = "yes";
     if (!::arg().isEmpty("domain-metadata-cache-ttl"))
       ::arg().set("zone-metadata-cache-ttl") = ::arg()["domain-metadata-cache-ttl"];
-    if (!::arg().isEmpty("slave-cycle-interval"))
-      ::arg().set("xfr-cycle-interval") = ::arg()["slave-cycle-interval"];
 
     // this mirroring back is on purpose, so that config dumps reflect the actual setting on both names
-    if (::arg().mustDo("primary"))
-      ::arg().set("master") = "yes";
-    if (::arg().mustDo("secondary"))
-      ::arg().set("slave") = "yes";
-    if (::arg().mustDo("secondary-do-renotify"))
-      ::arg().set("slave-renotify") = "yes";
-    if (::arg().mustDo("autosecondary"))
-      ::arg().set("superslave") = "yes";
-    if (::arg().mustDo("allow-unsigned-autoprimary"))
-      ::arg().set("allow-unsigned-supermaster") = "yes";
     ::arg().set("domain-metadata-cache-ttl") = ::arg()["zone-metadata-cache-ttl"];
-    ::arg().set("slave-cycle-interval") = ::arg()["xfr-cycle-interval"];
 
     g_log.setLoglevel((Logger::Urgency)(::arg().asNum("loglevel")));
     g_log.disableSyslog(::arg().mustDo("disable-syslog"));
index 79c42bf36c8a9a32b30e1f76be23ef5c6f33e9a2..a3d6d148a4f0a5fbcaec27eed215fc0b564f8693 100644 (file)
@@ -3115,14 +3115,14 @@ try
     }
     return createZone(DNSName(cmds.at(1)), cmds.size() > 2 ? DNSName(cmds.at(2)) : DNSName());
   }
-  else if (cmds.at(0) == "create-secondary-zone" || cmds.at(0) == "create-slave-zone") {
+  else if (cmds.at(0) == "create-secondary-zone") {
     if(cmds.size() < 3 ) {
       cerr << "Syntax: pdnsutil create-secondary-zone ZONE primary-ip [primary-ip..]" << endl;
       return 0;
     }
     return createSecondaryZone(cmds);
   }
-  else if (cmds.at(0) == "change-secondary-zone-primary" || cmds.at(0) == "change-slave-zone-master") {
+  else if (cmds.at(0) == "change-secondary-zone-primary") {
     if(cmds.size() < 3 ) {
       cerr << "Syntax: pdnsutil change-secondary-zone-primary ZONE primary-ip [primary-ip..]" << endl;
       return 0;
@@ -3799,9 +3799,9 @@ try
     }
     DNSName zname(cmds.at(1));
     string name = cmds.at(2);
-    if (cmds.at(3) == "primary" || cmds.at(3) == "master" || cmds.at(3) == "producer")
+    if (cmds.at(3) == "primary" || cmds.at(3) == "producer")
       metaKey = "TSIG-ALLOW-AXFR";
-    else if (cmds.at(3) == "secondary" || cmds.at(3) == "consumer" || cmds.at(3) == "slave")
+    else if (cmds.at(3) == "secondary" || cmds.at(3) == "consumer")
       metaKey = "AXFR-MASTER-TSIG";
     else {
       cerr << "Invalid parameter '" << cmds.at(3) << "', expected primary or secondary type" << endl;
@@ -3844,9 +3844,9 @@ try
     }
     DNSName zname(cmds.at(1));
     string name = cmds.at(2);
-    if (cmds.at(3) == "primary" || cmds.at(3) == "producer" || cmds.at(3) == "master")
+    if (cmds.at(3) == "primary" || cmds.at(3) == "producer")
       metaKey = "TSIG-ALLOW-AXFR";
-    else if (cmds.at(3) == "secondary" || cmds.at(3) == "consumer" || cmds.at(3) == "slave")
+    else if (cmds.at(3) == "secondary" || cmds.at(3) == "consumer")
       metaKey = "AXFR-MASTER-TSIG";
     else {
       cerr << "Invalid parameter '" << cmds.at(3) << "', expected primary or secondary type" << endl;
index a1b6be871470adfdc5a440375a5dd7026188a613..4dfa32ed8464e29e6450d7863db9d48e30dd6021 100644 (file)
@@ -114,7 +114,7 @@ static void startNewTransaction()
 static void emitDomain(const DNSName& domain, const vector<ComboAddress>* primaries = nullptr)
 {
   string iDomain = domain.toStringRootDot();
-  if(!::arg().mustDo("slave")) {
+  if (!::arg().mustDo("secondary")) {
     cout<<"insert into domains (name,type) values ("<<toLower(sqlstr(iDomain))<<",'NATIVE');"<<endl;
   }
   else
@@ -204,7 +204,7 @@ try
     ::arg().setSwitch("gmysql","Output in format suitable for default gmysqlbackend")="no";
     ::arg().setSwitch("gsqlite","Output in format suitable for default gsqlitebackend")="no";
     ::arg().setSwitch("verbose","Verbose comments on operation")="no";
-    ::arg().setSwitch("slave", "Keep BIND secondaries as secondaries. Only works with named-conf.") = "no";
+    ::arg().setSwitch("secondary", "Keep BIND secondaries as secondaries. Only works with named-conf.") = "no";
     ::arg().setSwitch("json-comments","Parse json={} field for disabled & comments")="no";
     ::arg().setSwitch("transactions","If target SQL supports it, use transactions")="no";
     ::arg().setSwitch("on-error-resume-next","Continue after errors")="no";
index 755ae125044e07878d1b55b816a86f1bc96048ce..6247dc04b72eae1c30aa6d43e687b640c1267efe 100644 (file)
@@ -63,8 +63,8 @@ class TestIXFR(AuthTest):
 launch=gsqlite3 bind
 gsqlite3-database=configs/auth/powerdns.sqlite
 gsqlite3-dnssec
-slave
-slave-cycle-interval=1
+secondary
+xfr-cycle-interval=1
 query-cache-ttl=20
 negquery-cache-ttl=60
 """
@@ -76,7 +76,7 @@ negquery-cache-ttl=60
     @classmethod
     def setUpClass(cls):
         super(TestIXFR, cls).setUpClass()
-        os.system("$PDNSUTIL --config-dir=configs/auth create-slave-zone example. 127.0.0.1:%s" % (xfrServerPort,))
+        os.system("$PDNSUTIL --config-dir=configs/auth create-secondary-zone example. 127.0.0.1:%s" % (xfrServerPort,))
         os.system("$PDNSUTIL --config-dir=configs/auth set-meta example. IXFR 1")
 
     def waitUntilCorrectSerialIsLoaded(self, serial, timeout=10):
index 6061d3123f5162abe93286272e77d7487b96c037..3db145e293f155a460a6b25bf8cbbec8f624b707 100644 (file)
@@ -144,12 +144,12 @@ class XFRIncompleteAuthTest(AuthTest):
 launch=gsqlite3 bind
 gsqlite3-database=configs/auth/powerdns.sqlite
 gsqlite3-dnssec
-slave
+secondary
 cache-ttl=0
 query-cache-ttl=0
 domain-metadata-cache-ttl=0
 negquery-cache-ttl=0
-slave-cycle-interval=1
+xfr-cycle-interval=1
 #loglevel=9
 #axfr-fetch-timeout=20
 """
@@ -157,7 +157,7 @@ slave-cycle-interval=1
     @classmethod
     def setUpClass(cls):
         super(XFRIncompleteAuthTest, cls).setUpClass()
-        os.system("$PDNSUTIL --config-dir=configs/auth create-slave-zone zone.rpz. 127.0.0.1:%s" % (badxfrServerPort,))
+        os.system("$PDNSUTIL --config-dir=configs/auth create-secondary-zone zone.rpz. 127.0.0.1:%s" % (badxfrServerPort,))
         os.system("$PDNSUTIL --config-dir=configs/auth set-meta zone.rpz. IXFR 1")
     
     def waitUntilCorrectSerialIsLoaded(self, serial, timeout=20):
index 9829dbc8cf99c43c0006f8510198990536aad897..16d771b7f39373f3269f88bb75d840b8b9b29e7b 100755 (executable)
@@ -84,7 +84,7 @@ start_master()
 {
         $RUNWRAPPER $PDNS --daemon=no --local-port=$port --config-dir=. --module-dir=../regression-tests/modules \
                 --config-name=gsqlite3-master --socket-dir=./ --no-shuffle \
-                --master=yes --local-address=127.0.0.1 \
+                --primary=yes --local-address=127.0.0.1 \
                 --query-local-address=127.0.0.1 --cache-ttl=$cachettl --dname-processing --allow-axfr-ips= &
 }
 
@@ -94,8 +94,8 @@ start_slave()
 
         $RUNWRAPPER $PDNS --daemon=no --local-port=$slaveport --config-dir=. --module-dir=../regression-tests/modules \
                 --config-name=gsqlite3-slave --socket-dir=./ --no-shuffle --local-address=127.0.0.2 \
-                --slave --retrieval-threads=4 --slave=yes --superslave=yes --query-local-address=127.0.0.2 \
-                --slave-cycle-interval=300 --allow-unsigned-notify=no --allow-unsigned-supermaster=no &
+                --secondary --retrieval-threads=4 --autosecondary=yes --query-local-address=127.0.0.2 \
+                --xfr-cycle-interval=300 --allow-unsigned-notify=no --allow-unsigned-autoprimary=no &
 }
 
 check_process ()
index 53b6881c07b03100cd57ce3f5be6b7c0416663c6..ae75429c122ec6b32c6bb92e3b7889455a9674e2 100755 (executable)
@@ -76,7 +76,7 @@ start_master()
 {
         $RUNWRAPPER $PDNS --daemon=no --local-port=$port --config-dir=. --module-dir=../regression-tests/modules \
                 --config-name=gsqlite3-master --socket-dir=./ --no-shuffle \
-                --master=yes --local-address=127.0.0.1 \
+                --primary=yes --local-address=127.0.0.1 \
                 --query-local-address=127.0.0.1 --cache-ttl=$cachettl --dname-processing --allow-axfr-ips= &
 }
 
@@ -86,8 +86,8 @@ start_slave()
 
         $RUNWRAPPER $PDNS --daemon=no --local-port=$slaveport --config-dir=. --module-dir=../regression-tests/modules \
                 --config-name=gsqlite3-slave --socket-dir=./ --no-shuffle --local-address=127.0.0.2 \
-                --slave --retrieval-threads=4 --slave=yes --superslave=yes --query-local-address=127.0.0.2 \
-                --slave-cycle-interval=300 --dname-processing &
+                --secondary --retrieval-threads=4 --autosecondary=yes --query-local-address=127.0.0.2 \
+                --xfr-cycle-interval=300 --dname-processing &
 }
 
 check_process ()
index d32a3cce32d192e61b4df841133b8313e6d67f59..6fb6e5a1ff8682e641ea9075567cae0fd80272fd 100644 (file)
@@ -82,7 +82,7 @@ __EOF__
             fi
             if [ "$zone" = "tsig.com" ]; then
                 $PDNSUTIL --config-dir=. --config-name=bind import-tsig-key test $ALGORITHM $KEY
-                $PDNSUTIL --config-dir=. --config-name=bind activate-tsig-key tsig.com test master
+                $PDNSUTIL --config-dir=. --config-name=bind activate-tsig-key tsig.com test primary
             fi
         done
 
index e002f53298415001297379ad032b6d4df0215cdb..ba10778a8e8f651b787872d557b081e9039e8a05 100644 (file)
@@ -33,7 +33,7 @@
        port=$((port+100))
 
        $RUNWRAPPER $PDNS2 --daemon=no --local-port=$port --socket-dir=./ \
-               --no-shuffle --launch=bind --bind-config=./named-slave.conf --slave \
+               --no-shuffle --launch=bind --bind-config=./named-slave.conf --secondary \
                --retrieval-threads=1  --config-name=bind-slave \
                --dnsupdate=yes \
                --cache-ttl=$cachettl --no-config --dname-processing --bind-dnssec-db=./dnssec-slave.sqlite3 \
index 4b7b02ddb74f0add0bb86a1e6c1bd467b2451678..1c58ac2337b7a84fa7173dda84af0d3b0a80951b 100644 (file)
@@ -18,7 +18,7 @@ __EOF__
                echo "INSERT INTO domains (name, type, master) VALUES('$zone','SLAVE','127.0.0.1:$port');" | $ISQL -b
                if [ "$zone" = "tsig.com" ]; then
                        ../pdns/pdnssec --config-dir=. --config-name=godbc2 import-tsig-key test $ALGORITHM $KEY
-                       ../pdns/pdnssec --config-dir=. --config-name=godbc2 activate-tsig-key tsig.com test slave
+                       ../pdns/pdnssec --config-dir=. --config-name=godbc2 activate-tsig-key tsig.com test secondary
                fi
                if [ "$zone" = "stest.com" ]; then
                        if [[ $skipreasons != *nolua* ]]; then
@@ -31,8 +31,8 @@ __EOF__
 
        $RUNWRAPPER $PDNS2 --daemon=no --local-port=$port --config-dir=. \
                --config-name=godbc2 --socket-dir=./ --no-shuffle \
-               --slave --retrieval-threads=4 \
-               --slave-cycle-interval=300 --dname-processing &
+               --secondary --retrieval-threads=4 \
+               --xfr-cycle-interval=300 --dname-processing &
 
        echo 'waiting for zones to be slaved'
        set +e
index 10aa8e21c04b36a0e4c3e302963a0a15cef8a221..1a6074a357ae27d08a4a6b501b4bc34a8e3507a3 100644 (file)
@@ -42,7 +42,7 @@ godbc-get-tsig-keys-query=select name,algorithm, secret from tsigkeys
 godbc-publish-domain-key-query=update cryptokeys set published=1 where domain_id=(select id from domains where name=?) and  cryptokeys.id=?
 godbc-id-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and type=? and name=? and domain_id=?
 godbc-info-all-primary-query=select domains.id, domains.name, domains.type, domains.notified_serial, domains.options, domains.catalog, records.content from records join domains on records.domain_id=domains.id and records.name=domains.name where records.type='SOA' and records.disabled=0 and domains.type in ('MASTER', 'PRODUCER')
-godbc-info-all-slaves-query=select domains.id, domains.name, domains.type, domains.master, domains.last_check, records.content from domains LEFT JOIN records ON records.domain_id=domains.id AND records.type='SOA' AND records.name=domains.name where domains.type in ('SLAVE', 'CONSUMER')
+godbc-info-all-secondaries-query=select domains.id, domains.name, domains.type, domains.master, domains.last_check, records.content from domains LEFT JOIN records ON records.domain_id=domains.id AND records.type='SOA' AND records.name=domains.name where domains.type in ('SLAVE', 'CONSUMER')
 godbc-info-zone-query=select id,name,master,last_check,notified_serial,type,options,catalog,account from domains where name=?
 godbc-info-producer-members-query=select domains.id, domains.name, domains.options from records join domains on records.domain_id=domains.id and records.name=domains.name where domains.type='MASTER' and domains.catalog=? and records.type='SOA' and records.disabled=0
 godbc-info-consumer-members-query=select id, name, options, master from domains where type='SLAVE' and catalog=?
index 7c727266ee73e2124958fe09cadd6d0722591bf9..e1b06f057279fcc9e91a27b9883a1fa12807e8b1 100644 (file)
@@ -27,7 +27,7 @@ __EOF__
                "$GPGSQL2DB"
                if [ "$zone" = "tsig.com" ]; then
                        $PDNSUTIL --config-dir=. --config-name=gpgsql2 import-tsig-key test $ALGORITHM $KEY
-                       $PDNSUTIL --config-dir=. --config-name=gpgsql2 activate-tsig-key tsig.com test slave
+                       $PDNSUTIL --config-dir=. --config-name=gpgsql2 activate-tsig-key tsig.com test secondary
                fi
                if [ "$zone" = "stest.com" ]; then
                        if [[ $skipreasons != *nolua* ]]; then
@@ -40,8 +40,8 @@ __EOF__
 
        $RUNWRAPPER $PDNS2 --daemon=no --local-port=$port --config-dir=. \
                --config-name=gpgsql2 --socket-dir=./ --no-shuffle \
-               --slave --retrieval-threads=4 \
-               --slave-cycle-interval=300 --dname-processing &
+               --secondary --retrieval-threads=4 \
+               --xfr-cycle-interval=300 --dname-processing &
 
        echo 'waiting for zones to be slaved'
        loopcount=0
index 494eb0a7f9c9003766541941f75cd25fc68a9539..a1134d23118c6dc1f41ad7f9ec84103d1b2960d1 100644 (file)
@@ -41,7 +41,7 @@ gsql_master()
         fi
         if [ "$zone" = "tsig.com" ]; then
             $PDNSUTIL --config-dir=. --config-name=$backend import-tsig-key test $ALGORITHM $KEY
-            $PDNSUTIL --config-dir=. --config-name=$backend activate-tsig-key tsig.com test master
+            $PDNSUTIL --config-dir=. --config-name=$backend activate-tsig-key tsig.com test primary
         fi
     done
 
index 88bea544966b8a7d157460e31df791cb150c3606..6dcc71376e892ab83826d60c37ca6aad0ef752ef 100644 (file)
@@ -22,7 +22,7 @@ __EOF__
                sqlite3 pdns.sqlite32 "INSERT INTO domains (name, type, master) VALUES('$zone','SLAVE','127.0.0.1:$port');"
                if [ "$zone" = "tsig.com" ]; then
                        $PDNSUTIL --config-dir=. --config-name=gsqlite32 import-tsig-key test $ALGORITHM $KEY
-                       $PDNSUTIL --config-dir=. --config-name=gsqlite32 activate-tsig-key tsig.com test slave
+                       $PDNSUTIL --config-dir=. --config-name=gsqlite32 activate-tsig-key tsig.com test secondary
                fi
                if [ "$zone" = "stest.com" ]; then
                        if [[ $skipreasons != *nolua* ]]; then
index 6b6a18016f8c42c67d7af90a27ba1f75fd36467d..c1bf9346b205b1cd6517b965c24947e4816eedda 100644 (file)
@@ -47,7 +47,7 @@ __EOF__
             fi
             if [ "$zone" = "tsig.com" ]; then
                 $PDNSUTIL --config-dir=. --config-name=lmdb import-tsig-key test $ALGORITHM $KEY
-                $PDNSUTIL --config-dir=. --config-name=lmdb activate-tsig-key tsig.com test master
+                $PDNSUTIL --config-dir=. --config-name=lmdb activate-tsig-key tsig.com test primary
             fi
         done