]> granicus.if.org Git - pdns/commitdiff
enable sqlite3 as a dnssec backend - especially useful as key storage for the BIND...
authorBert Hubert <bert.hubert@netherlabs.nl>
Sat, 1 Jan 2011 20:26:46 +0000 (20:26 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sat, 1 Jan 2011 20:26:46 +0000 (20:26 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1780 d19b8d6e-7fed-0310-83ef-9ca221ded41b

modules/gsqlite3backend/gsqlite3backend.cc

index 626383166afa1b387012899c4ee700f3056915bb..3aafdd104ef63b339681b99781b4b9c4f1d79093 100644 (file)
@@ -63,6 +63,25 @@ public:
     declare( suffix, "wildcard-any-id-query", "Wildcard ANY with ID query","select content,ttl,prio,type,domain_id,name from records where name like '%s' and domain_id=%d");
 
     declare( suffix, "list-query", "AXFR query", "select content,ttl,prio,type,domain_id,name from records where domain_id=%d");
+    
+    // and now with auth
+    declare(suffix,"basic-query-auth","Basic query","select content,ttl,prio,type,domain_id,name, auth from records where type='%s' and name='%s'");
+    declare(suffix,"id-query-auth","Basic with ID query","select content,ttl,prio,type,domain_id,name, auth from records where type='%s' and name='%s' and domain_id=%d");
+    declare(suffix,"wildcard-query-auth","Wildcard query","select content,ttl,prio,type,domain_id,name, auth from records where type='%s' and name like '%s'");
+    declare(suffix,"wildcard-id-query-auth","Wildcard with ID query","select content,ttl,prio,type,domain_id,name, auth from records where type='%s' and name like '%s' and domain_id='%d'");
+
+    declare(suffix,"any-query-auth","Any query","select content,ttl,prio,type,domain_id,name, auth from records where name='%s'");
+    declare(suffix,"any-id-query-auth","Any with ID query","select content,ttl,prio,type,domain_id,name, auth from records where name='%s' and domain_id=%d");
+    declare(suffix,"wildcard-any-query-auth","Wildcard ANY query","select content,ttl,prio,type,domain_id,name, auth from records where name like '%s'");
+    declare(suffix,"wildcard-any-id-query-auth","Wildcard ANY with ID query","select content,ttl,prio,type,domain_id,name, auth from records where name like '%s' and domain_id='%d'");
+
+    declare(suffix,"list-query-auth","AXFR query", "select content,ttl,prio,type,domain_id,name, auth from records where domain_id='%d'");
+    
+    declare(suffix,"get-order-before-query","DNSSEC Ordering Query, before", "select ordername, name from records where ordername <= '%s' and auth=1 and domain_id=%d order by 1 desc limit 1");
+    declare(suffix,"get-order-after-query","DNSSEC Ordering Query, afer", "select min(ordername) from records where ordername > '%s' and auth=1 and domain_id=%d");
+    declare(suffix,"set-order-and-auth-query", "DNSSEC set ordering query", "update records set ordername='%s',auth=%d where name='%s' and domain_id='%d'");
+    
+    
     declare( suffix, "master-zone-query", "Data", "select master from domains where name='%s' and type='SLAVE'");
 
     declare( suffix, "info-zone-query", "","select id,name,master,last_check,notified_serial,type from domains where name='%s'");
@@ -75,7 +94,9 @@ public:
     declare( suffix, "update-lastcheck-query", "", "update domains set last_check=%d where id=%d");
     declare( suffix, "info-all-master-query", "", "select id,name,master,last_check,notified_serial,type from domains where type='MASTER'");
     declare( suffix, "delete-zone-query", "", "delete from records where domain_id=%d");
-    declare(suffix,"check-acl-query","", "select value from acls where acl_type='%s' and acl_key='%s'");
+    declare( suffix, "check-acl-query","", "select value from acls where acl_type='%s' and acl_key='%s'");
+    declare(suffix, "dnssec", "Assume DNSSEC Schema is in place","false");
+    
   }
   
   //! Constructs a new gSQLite3Backend object.