Changeset 1804
- Timestamp:
- 01/04/11 16:09:51 (2 years ago)
- Location:
- trunk/pdns
- Files:
-
- 4 modified
-
modules/gmysqlbackend/gmysqlbackend.cc (modified) (1 diff)
-
modules/gpgsqlbackend/gpgsqlbackend.cc (modified) (1 diff)
-
modules/gsqlite3backend/gsqlite3backend.cc (modified) (1 diff)
-
pdns/backends/gsql/gsqlbackend.cc (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/modules/gmysqlbackend/gmysqlbackend.cc
r1800 r1804 51 51 declare(suffix,"socket","Pdns backend socket to connect to",""); 52 52 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"); 54 54 55 55 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 51 51 declare(suffix,"socket","Pdns backend socket to connect to",""); 52 52 declare(suffix,"password","Pdns backend password to connect with",""); 53 53 declare(suffix, "dnssec", "Assume DNSSEC Schema is in place","no"); 54 54 declare(suffix,"basic-query","Basic query","select content,ttl,prio,type,domain_id,name from records where type='%s' and name='%s'"); 55 55 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 96 96 declare( suffix, "delete-zone-query", "", "delete from records where domain_id=%d"); 97 97 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"); 99 99 100 100 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 259 259 bool GSQLBackend::updateDNSSECOrderAndAuth(uint32_t domain_id, const std::string& zonename, const std::string& qname, bool auth) 260 260 { 261 if(!d_dnssecQueries) 262 return false; 261 263 string ins=toLower(labelReverse(makeRelative(qname, zonename))); 262 264 return this->updateDNSSECOrderAndAuthAbsolute(domain_id, qname, ins, auth); … … 265 267 bool GSQLBackend::updateDNSSECOrderAndAuthAbsolute(uint32_t domain_id, const std::string& qname, const std::string& ordername, bool auth) 266 268 { 269 if(!d_dnssecQueries) 270 return false; 267 271 char output[1024]; 268 272 // ordername='%s',auth=%d where name='%s' and domain_id='%d' … … 276 280 bool GSQLBackend::getBeforeAndAfterNamesAbsolute(uint32_t id, const std::string& qname, std::string& unhashed, std::string& before, std::string& after) 277 281 { 282 if(!d_dnssecQueries) 283 return false; 278 284 cerr<<"gsql before/after called for id="<<id<<", qname='"<<qname<<"'"<<endl; 279 285 unhashed.clear(); before.clear(); after.clear(); … … 319 325 int GSQLBackend::addDomainKey(const string& name, const KeyData& key) 320 326 { 327 if(!d_dnssecQueries) 328 return -1; 321 329 char output[16384]; 322 330 snprintf(output,sizeof(output)-1,d_AddDomainKeyQuery.c_str(), … … 334 342 bool GSQLBackend::activateDomainKey(const string& name, unsigned int id) 335 343 { 344 if(!d_dnssecQueries) 345 return false; 336 346 char output[1024]; 337 347 snprintf(output,sizeof(output)-1,d_ActivateDomainKeyQuery.c_str(), sqlEscape(toLower(name)).c_str(), id); … … 348 358 bool GSQLBackend::deactivateDomainKey(const string& name, unsigned int id) 349 359 { 360 if(!d_dnssecQueries) 361 return false; 350 362 char output[1024]; 351 363 snprintf(output,sizeof(output)-1,d_DeactivateDomainKeyQuery.c_str(), sqlEscape(toLower(name)).c_str(), id); … … 362 374 bool GSQLBackend::removeDomainKey(const string& name, unsigned int id) 363 375 { 376 if(!d_dnssecQueries) 377 return false; 364 378 char output[1024]; 365 379 snprintf(output,sizeof(output)-1,d_RemoveDomainKeyQuery.c_str(), sqlEscape(toLower(name)).c_str(), id); … … 378 392 bool GSQLBackend::getDomainKeys(const string& name, unsigned int kind, std::vector<KeyData>& keys) 379 393 { 394 if(!d_dnssecQueries) 395 return false; 380 396 char output[1024]; 381 397 snprintf(output,sizeof(output)-1,d_ListDomainKeysQuery.c_str(), sqlEscape(toLower(name)).c_str()); … … 407 423 bool GSQLBackend::getDomainMetadata(const string& name, const std::string& kind, std::vector<std::string>& meta) 408 424 { 425 if(!d_dnssecQueries) 426 return false; 409 427 char output[1024]; 410 428 snprintf(output,sizeof(output)-1,d_GetDomainMetadataQuery.c_str(), sqlEscape(name).c_str(), sqlEscape(kind).c_str()); … … 429 447 { 430 448 char output[16384]; 449 if(!d_dnssecQueries) 450 return false; 431 451 432 452 if(!meta.empty())