Changeset 1107
- Timestamp:
- 11/17/07 22:47:19 (1 year ago)
- Files:
-
- trunk/pdns/modules/ldapbackend/ldapbackend.cc (modified) (10 diffs)
- trunk/pdns/modules/ldapbackend/ldapbackend.hh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/pdns/modules/ldapbackend/ldapbackend.cc
r1069 r1107 199 199 { 200 200 string filter, attr, qesc; 201 c har** attributes = ldap_attrany + 1; // skip associatedDomain202 c har* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL };201 const char** attributes = ldap_attrany + 1; // skip associatedDomain 202 const char* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL }; 203 203 204 204 … … 210 210 attr = qtype.getName() + "Record"; 211 211 filter = "&(" + filter + ")(" + attr + "=*)"; 212 attronly[0] = (char*)attr.c_str();212 attronly[0] = attr.c_str(); 213 213 attributes = attronly; 214 214 } … … 217 217 218 218 DLOG( L << Logger::Debug << m_myname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl ); 219 m_msgid = m_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, (const char**)attributes );219 m_msgid = m_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, attributes ); 220 220 } 221 221 … … 227 227 vector<string> parts; 228 228 string filter, attr, qesc; 229 c har** attributes = ldap_attrany + 1; // skip associatedDomain230 c har* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL };229 const char** attributes = ldap_attrany + 1; // skip associatedDomain 230 const char* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL }; 231 231 232 232 … … 254 254 attr = qtype.getName() + "Record"; 255 255 filter = "&(" + filter + ")(" + attr + "=*)"; 256 attronly[0] = (char*)attr.c_str();256 attronly[0] = attr.c_str(); 257 257 attributes = attronly; 258 258 } … … 262 262 263 263 DLOG( L << Logger::Debug << m_myname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl ); 264 m_msgid = m_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, (const char**)attributes );264 m_msgid = m_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, attributes ); 265 265 } 266 266 … … 270 270 { 271 271 string filter, attr, qesc, dn; 272 c har** attributes = ldap_attrany + 1; // skip associatedDomain273 c har* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL };272 const char** attributes = ldap_attrany + 1; // skip associatedDomain 273 const char* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL }; 274 274 vector<string>::reverse_iterator i; 275 275 vector<string> parts; … … 283 283 attr = qtype.getName() + "Record"; 284 284 filter = "&(" + filter + ")(" + attr + "=*)"; 285 attronly[0] = (char*)attr.c_str();285 attronly[0] = attr.c_str(); 286 286 attributes = attronly; 287 287 } … … 296 296 297 297 DLOG( L << Logger::Debug << m_myname << " Search = basedn: " << dn + getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl ); 298 m_msgid = m_pldap->search( dn + getArg( "basedn" ), LDAP_SCOPE_BASE, filter, (const char**)attributes );298 m_msgid = m_pldap->search( dn + getArg( "basedn" ), LDAP_SCOPE_BASE, filter, attributes ); 299 299 } 300 300 … … 492 492 string filter; 493 493 SOAData sd; 494 c har* attronly[] = { "sOARecord", NULL };494 const char* attronly[] = { "sOARecord", NULL }; 495 495 496 496 497 497 // search for SOARecord of domain 498 498 filter = "(&(associatedDomain=" + toLower( m_pldap->escape( domain ) ) + ")(SOARecord=*))"; 499 m_msgid = m_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, (const char**)attronly );499 m_msgid = m_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, attronly ); 500 500 m_pldap->getSearchEntry( m_msgid, m_result ); 501 501 trunk/pdns/modules/ldapbackend/ldapbackend.hh
r1069 r1107 50 50 51 51 52 static c har* ldap_attrany[] = {52 static const char* ldap_attrany[] = { 53 53 "associatedDomain", 54 54 "dNSTTL",