From: Bert Hubert Date: Sat, 1 Jan 2011 20:26:46 +0000 (+0000) Subject: enable sqlite3 as a dnssec backend - especially useful as key storage for the BIND... X-Git-Tag: auth-3.0~467 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dac8c470c87a2bfaec5fdd3d6b8def02f624f558;p=pdns enable sqlite3 as a dnssec backend - especially useful as key storage for the BIND backend git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1780 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/modules/gsqlite3backend/gsqlite3backend.cc b/modules/gsqlite3backend/gsqlite3backend.cc index 626383166..3aafdd104 100644 --- a/modules/gsqlite3backend/gsqlite3backend.cc +++ b/modules/gsqlite3backend/gsqlite3backend.cc @@ -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.