]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/tmplout.c
Fix off by one bug
[openldap] / libraries / libldap / tmplout.c
index 385312256f94e7663d9f9e235b8e9702573ea383..e73a53bed547f5f8b059c235ec51a86acacb7dd4 100644 (file)
@@ -475,15 +475,9 @@ do_entry2text_search(
 
            ocattrs[0] = OCATTRNAME;
            ocattrs[1] = NULL;
-#ifdef LDAP_CONNECTIONLESS
-           if ( LDAP_IS_CLDAP( ld ))
-                   err = cldap_search_s( ld, dn, LDAP_SCOPE_BASE,
-                       NULL, ocattrs, 0, &ldmp, NULL );
-           else
-#endif /* LDAP_CONNECTIONLESS */
-                   err = ldap_search_st( ld, dn, LDAP_SCOPE_BASE,
-                           NULL, ocattrs, 0, &timeout, &ldmp );
 
+               err = ldap_search_st( ld, dn, LDAP_SCOPE_BASE,
+                       NULL, ocattrs, 0, &timeout, &ldmp );
            if ( err == LDAP_SUCCESS ) {
                entry = ldap_first_entry( ld, ldmp );
            }
@@ -509,12 +503,6 @@ do_entry2text_search(
        fetchattrs = ldap_tmplattrs( tmpl, NULL, 1, LDAP_SYN_OPT_DEFER );
     }
 
-#ifdef LDAP_CONNECTIONLESS
-    if ( LDAP_IS_CLDAP( ld ))
-       err = cldap_search_s( ld, dn, LDAP_SCOPE_BASE, NULL,
-               fetchattrs, 0, &ldmp, NULL );
-    else
-#endif /* LDAP_CONNECTIONLESS */
        err = ldap_search_st( ld, dn, LDAP_SCOPE_BASE, NULL,
                fetchattrs, 0, &timeout, &ldmp );
 
@@ -938,7 +926,7 @@ time2text( char *ldtimestr, int dateonly )
    
     timestr[ strlen( timestr ) - 1 ] = zone;   /* replace trailing newline */
     if ( dateonly ) {
-       SAFEMEMCPY( timestr + 11, timestr + 20, strlen( timestr + 20 ) + 1 );
+               AC_MEMCPY( timestr + 11, timestr + 20, strlen( timestr + 20 ) + 1 );
     }
 
     return( timestr );
@@ -1078,12 +1066,6 @@ searchaction( LDAP *ld, char *buf, char *base, LDAPMessage *entry, char *dn,
     timeout.tv_sec = SEARCH_TIMEOUT_SECS;
     timeout.tv_usec = 0;
 
-#ifdef LDAP_CONNECTIONLESS
-    if ( LDAP_IS_CLDAP( ld ))
-       lderr = cldap_search_s( ld, base, LDAP_SCOPE_SUBTREE, filter, retattrs,
-               0, &ldmp, NULL );
-    else
-#endif /* LDAP_CONNECTIONLESS */
        lderr = ldap_search_st( ld, base, LDAP_SCOPE_SUBTREE, filter, retattrs,
                0, &timeout, &ldmp );