Changeset 1107

Show
Ignore:
Timestamp:
11/17/07 22:47:19 (1 year ago)
Author:
ahu
Message:

gcc 4.3 fixes for LDAP from Norbert

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/pdns/modules/ldapbackend/ldapbackend.cc

    r1069 r1107  
    199199{ 
    200200        string filter, attr, qesc; 
    201         char** attributes = ldap_attrany + 1;   // skip associatedDomain 
    202         char* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL }; 
     201        const char** attributes = ldap_attrany + 1;   // skip associatedDomain 
     202        const char* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL }; 
    203203 
    204204 
     
    210210                attr = qtype.getName() + "Record"; 
    211211                filter = "&(" + filter + ")(" + attr + "=*)"; 
    212                 attronly[0] = (char*) attr.c_str(); 
     212                attronly[0] = attr.c_str(); 
    213213                attributes = attronly; 
    214214        } 
     
    217217 
    218218        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 ); 
    220220} 
    221221 
     
    227227        vector<string> parts; 
    228228        string filter, attr, qesc; 
    229         char** attributes = ldap_attrany + 1;   // skip associatedDomain 
    230         char* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL }; 
     229        const char** attributes = ldap_attrany + 1;   // skip associatedDomain 
     230        const char* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL }; 
    231231 
    232232 
     
    254254                        attr = qtype.getName() + "Record"; 
    255255                        filter = "&(" + filter + ")(" + attr + "=*)"; 
    256                         attronly[0] = (char*) attr.c_str(); 
     256                        attronly[0] = attr.c_str(); 
    257257                        attributes = attronly; 
    258258                } 
     
    262262 
    263263        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 ); 
    265265} 
    266266 
     
    270270{ 
    271271        string filter, attr, qesc, dn; 
    272         char** attributes = ldap_attrany + 1;   // skip associatedDomain 
    273         char* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL }; 
     272        const char** attributes = ldap_attrany + 1;   // skip associatedDomain 
     273        const char* attronly[] = { NULL, "dNSTTL", "modifyTimestamp", NULL }; 
    274274        vector<string>::reverse_iterator i; 
    275275        vector<string> parts; 
     
    283283                attr = qtype.getName() + "Record"; 
    284284                filter = "&(" + filter + ")(" + attr + "=*)"; 
    285                 attronly[0] = (char*) attr.c_str(); 
     285                attronly[0] = attr.c_str(); 
    286286                attributes = attronly; 
    287287        } 
     
    296296 
    297297        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 ); 
    299299} 
    300300 
     
    492492        string filter; 
    493493        SOAData sd; 
    494         char* attronly[] = { "sOARecord", NULL }; 
     494        const char* attronly[] = { "sOARecord", NULL }; 
    495495 
    496496 
    497497        // search for SOARecord of domain 
    498498        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 ); 
    500500        m_pldap->getSearchEntry( m_msgid, m_result ); 
    501501 
  • trunk/pdns/modules/ldapbackend/ldapbackend.hh

    r1069 r1107  
    5050 
    5151 
    52 static char* ldap_attrany[] = { 
     52static const char* ldap_attrany[] = { 
    5353        "associatedDomain", 
    5454        "dNSTTL",