~ubuntu-branches/ubuntu/maverick/pdns/maverick-updates

« back to all changes in this revision

Viewing changes to modules/gpgsqlbackend/gpgsqlbackend.cc

  • Committer: Bazaar Package Importer
  • Author(s): Debian PowerDNS Maintainers
  • Date: 2005-07-29 20:24:33 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050729202433-cfrk71byx0mmmbk6
Tags: 2.9.18-1
* New upstream release (Closes: #318798)
* Drop patches: 64bit-compile-fix.dpatch, addfeatures-ldapbackend.dpatch,
  amd64-compilefix.dpatch, blankout-domain-fix.dpatch,
  consistent-sql.dpatch, dosfix-ldapbackend.dpatch, fix-exit-status.dpatch,
  gpgsql-compilefix.dpatch, gsqlite-compilefix.dpatch, gsqlite-slave.dpatch,
  recursor-slowdown.patch.dpatch, typoinitscript.dpatch, zone2ldap.dpatch
  They are applied upstream.
* The ldapbackend did not properly escape all queries, allowing it to fail
  and not answer questions. (CAN-2005-2301)
* Questions from clients denied recursion could blank out answers to clients
  who are allowed recursion services, temporarily. (CAN-2005-2302)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// $Id: gpgsqlbackend.cc,v 1.3 2003/08/30 14:34:04 ahu Exp $ 
2
1
#include <string>
3
2
#include <map>
4
3
 
23
22
  try {
24
23
    setDB(new SPgSQL(getArg("dbname"),
25
24
                  getArg("host"),
 
25
                  getArg("port"),
26
26
                  getArg("socket"),
27
27
                  getArg("user"),
28
28
                  getArg("password")));
47
47
    declare(suffix,"dbname","Pdns backend database name to connect to","powerdns");
48
48
    declare(suffix,"user","Pdns backend user to connect as","powerdns");
49
49
    declare(suffix,"host","Pdns backend host to connect to","");
 
50
    declare(suffix,"port","Database backend port to connect to","");
50
51
    declare(suffix,"socket","Pdns backend socket to connect to","");
51
52
    declare(suffix,"password","Pdns backend password to connect with","");
52
53
 
58
59
    declare(suffix,"any-query","Any query","select content,ttl,prio,type,domain_id,name from records where name='%s'");
59
60
    declare(suffix,"any-id-query","Any with ID query","select content,ttl,prio,type,domain_id,name from records where name='%s' and domain_id=%d");
60
61
    declare(suffix,"wildcard-any-query","Wildcard ANY query","select content,ttl,prio,type,domain_id,name from records where name like '%s'");
61
 
    declare(suffix,"wildcard-any-id-query","Wildcard ANY with ID query","select content,ttl,prio,type,domain_id,name from records where like '%s' and domain_id='%d'");
 
62
    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'");
62
63
 
63
64
    declare(suffix,"list-query","AXFR query", "select content,ttl,prio,type,domain_id,name from records where domain_id='%d'");
64
65
    declare(suffix,"master-zone-query","Data", "select master from domains where name='%s' and type='SLAVE'");