Changeset 1804

Show
Ignore:
Timestamp:
01/04/11 16:09:51 (2 years ago)
Author:
ahu
Message:

PAY ATTENTION! from this commit onwards, generic backends will NOT perform dnssec queries by default, you'll have to turn this on with: 'gmysql-dnssec' or 'gpgsql-dnssec' etc

Location:
trunk/pdns
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/modules/gmysqlbackend/gmysqlbackend.cc

    r1800 r1804  
    5151    declare(suffix,"socket","Pdns backend socket to connect to",""); 
    5252    declare(suffix,"password","Pdns backend password to connect with",""); 
    53     declare(suffix,"dnssec","Assume DNSSEC Schema is in place","false"); 
     53    declare(suffix,"dnssec","Assume DNSSEC Schema is in place","no"); 
    5454 
    5555    declare(suffix,"basic-query","Basic query","select content,ttl,prio,type,domain_id,name from records where type='%s' and name='%s'"); 
  • trunk/pdns/modules/gpgsqlbackend/gpgsqlbackend.cc

    r1800 r1804  
    5151    declare(suffix,"socket","Pdns backend socket to connect to",""); 
    5252    declare(suffix,"password","Pdns backend password to connect with",""); 
    53  
     53    declare(suffix, "dnssec", "Assume DNSSEC Schema is in place","no"); 
    5454    declare(suffix,"basic-query","Basic query","select content,ttl,prio,type,domain_id,name from records where type='%s' and name='%s'"); 
    5555    declare(suffix,"id-query","Basic with ID query","select content,ttl,prio,type,domain_id,name from records where type='%s' and name='%s' and domain_id=%d"); 
  • trunk/pdns/modules/gsqlite3backend/gsqlite3backend.cc

    r1800 r1804  
    9696    declare( suffix, "delete-zone-query", "", "delete from records where domain_id=%d"); 
    9797    declare( suffix, "check-acl-query","", "select value from acls where acl_type='%s' and acl_key='%s'"); 
    98     declare(suffix, "dnssec", "Assume DNSSEC Schema is in place","false"); 
     98    declare(suffix, "dnssec", "Assume DNSSEC Schema is in place","no"); 
    9999 
    100100    declare(suffix,"add-domain-key-query","", "insert into cryptokeys (domain_id, flags, active, content) select id, %d, %d, '%s' from domains where name='%s'"); 
  • trunk/pdns/pdns/backends/gsql/gsqlbackend.cc

    r1800 r1804  
    259259bool GSQLBackend::updateDNSSECOrderAndAuth(uint32_t domain_id, const std::string& zonename, const std::string& qname, bool auth) 
    260260{ 
     261  if(!d_dnssecQueries) 
     262    return false; 
    261263  string ins=toLower(labelReverse(makeRelative(qname, zonename))); 
    262264  return this->updateDNSSECOrderAndAuthAbsolute(domain_id, qname, ins, auth); 
     
    265267bool GSQLBackend::updateDNSSECOrderAndAuthAbsolute(uint32_t domain_id, const std::string& qname, const std::string& ordername, bool auth) 
    266268{ 
     269  if(!d_dnssecQueries) 
     270    return false; 
    267271  char output[1024]; 
    268272  // ordername='%s',auth=%d where name='%s' and domain_id='%d' 
     
    276280bool GSQLBackend::getBeforeAndAfterNamesAbsolute(uint32_t id, const std::string& qname, std::string& unhashed, std::string& before, std::string& after) 
    277281{ 
     282  if(!d_dnssecQueries) 
     283    return false; 
    278284  cerr<<"gsql before/after called for id="<<id<<", qname='"<<qname<<"'"<<endl; 
    279285  unhashed.clear(); before.clear(); after.clear(); 
     
    319325int GSQLBackend::addDomainKey(const string& name, const KeyData& key) 
    320326{ 
     327  if(!d_dnssecQueries) 
     328    return -1; 
    321329  char output[16384];   
    322330  snprintf(output,sizeof(output)-1,d_AddDomainKeyQuery.c_str(), 
     
    334342bool GSQLBackend::activateDomainKey(const string& name, unsigned int id) 
    335343{ 
     344  if(!d_dnssecQueries) 
     345    return false; 
    336346  char output[1024]; 
    337347  snprintf(output,sizeof(output)-1,d_ActivateDomainKeyQuery.c_str(), sqlEscape(toLower(name)).c_str(), id); 
     
    348358bool GSQLBackend::deactivateDomainKey(const string& name, unsigned int id) 
    349359{ 
     360  if(!d_dnssecQueries) 
     361    return false; 
    350362  char output[1024]; 
    351363  snprintf(output,sizeof(output)-1,d_DeactivateDomainKeyQuery.c_str(), sqlEscape(toLower(name)).c_str(), id); 
     
    362374bool GSQLBackend::removeDomainKey(const string& name, unsigned int id) 
    363375{ 
     376  if(!d_dnssecQueries) 
     377    return false; 
    364378  char output[1024]; 
    365379  snprintf(output,sizeof(output)-1,d_RemoveDomainKeyQuery.c_str(), sqlEscape(toLower(name)).c_str(), id); 
     
    378392bool GSQLBackend::getDomainKeys(const string& name, unsigned int kind, std::vector<KeyData>& keys) 
    379393{ 
     394  if(!d_dnssecQueries) 
     395    return false; 
    380396  char output[1024];   
    381397  snprintf(output,sizeof(output)-1,d_ListDomainKeysQuery.c_str(), sqlEscape(toLower(name)).c_str()); 
     
    407423bool GSQLBackend::getDomainMetadata(const string& name, const std::string& kind, std::vector<std::string>& meta) 
    408424{ 
     425  if(!d_dnssecQueries) 
     426    return false; 
    409427  char output[1024];   
    410428  snprintf(output,sizeof(output)-1,d_GetDomainMetadataQuery.c_str(), sqlEscape(name).c_str(), sqlEscape(kind).c_str()); 
     
    429447{ 
    430448  char output[16384];   
     449  if(!d_dnssecQueries) 
     450    return false; 
    431451 
    432452  if(!meta.empty())