Import changes from devel including:

+       Fixed -lldap SASL got_max_ssf bug
+       Fixed -lldap TCP_NODELAY bug
+       Fixed -llutil sa_flags never set bug
+       Removed lint
plus
	clients/tools ldap_init() fixes
	-lldap SASL fixes
	binary syntax ";binary" transfer change
This commit is contained in:
Kurt Zeilenga 2000-09-13 22:19:44 +00:00
parent 744d454c8b
commit 0cec541907
16 changed files with 79 additions and 50 deletions

View File

@ -3,8 +3,11 @@ OpenLDAP 2.0 Change Log
OpenLDAP 2.0.X Engineering
Fixed KBIND (ITS#717)
Fixed clients/tools -R handling (ITS#726)
Fixed -lldap SASL got_max_ssf bug
Fixed -lldap TCP_NODELAY bug
Fixed -lldap TLS issues (ITS#733)
Fixed -lldap_r NT threads (ITS#732)
Fixed -llutil sa_flags never set bug
Fixed ldappasswd -A -S crash (ITS#714)
Fixed ldappasswd user argument usage
Fixed slapd disallow bind_anon (ITS#721)
@ -19,6 +22,7 @@ OpenLDAP 2.0.X Engineering
Added slapd syntax/mr routines
Added slapd allow/disallow options
Added slapd defaultSearchBase and DN verify (ITS#723)
Removed lint
Build Environment
Added test000-rootdse
Added Corba & Java Schema

View File

@ -501,20 +501,25 @@ main( int argc, char **argv )
ldaphost != NULL ? ldaphost : "<DEFAULT>",
ldapport );
}
ld = ldap_init( ldaphost, ldapport );
if( ld == NULL ) {
perror("ldapsearch: ldap_init");
return EXIT_FAILURE;
}
} else {
if ( verbose ) {
fprintf( stderr, "ldap_initialize( %s )\n",
ldapuri != NULL ? ldapuri : "<DEFAULT>" );
}
(void) ldap_initialize( &ld, ldapuri );
}
if( ld == NULL ) {
fprintf( stderr, "Could not create LDAP session handle (%d): %s\n",
rc, ldap_err2string(rc) );
return EXIT_FAILURE;
rc = ldap_initialize( &ld, ldapuri );
if( rc != LDAP_SUCCESS ) {
fprintf( stderr, "Could not create LDAP session handle (%d): %s\n",
rc, ldap_err2string(rc) );
return EXIT_FAILURE;
}
}
{

View File

@ -568,20 +568,25 @@ main( int argc, char **argv )
ldaphost != NULL ? ldaphost : "<DEFAULT>",
ldapport );
}
ld = ldap_init( ldaphost, ldapport );
if( ld == NULL ) {
perror("ldapsearch: ldap_init");
return EXIT_FAILURE;
}
} else {
if ( verbose ) {
fprintf( stderr, "ldap_initialize( %s )\n",
ldapuri != NULL ? ldapuri : "<DEFAULT>" );
}
(void) ldap_initialize( &ld, ldapuri );
}
if( ld == NULL ) {
fprintf( stderr, "Could not create LDAP session handle (%d): %s\n",
rc, ldap_err2string(rc) );
return EXIT_FAILURE;
rc = ldap_initialize( &ld, ldapuri );
if( rc != LDAP_SUCCESS ) {
fprintf( stderr, "Could not create LDAP session handle (%d): %s\n",
rc, ldap_err2string(rc) );
return EXIT_FAILURE;
}
}
/* referrals */

View File

@ -544,20 +544,25 @@ main(int argc, char **argv)
ldaphost != NULL ? ldaphost : "<DEFAULT>",
ldapport );
}
ld = ldap_init( ldaphost, ldapport );
if( ld == NULL ) {
perror("ldapsearch: ldap_init");
return EXIT_FAILURE;
}
} else {
if ( verbose ) {
fprintf( stderr, "ldap_initialize( %s )\n",
ldapuri != NULL ? ldapuri : "<DEFAULT>" );
}
(void) ldap_initialize( &ld, ldapuri );
}
if( ld == NULL ) {
fprintf( stderr, "Could not create LDAP session handle (%d): %s\n",
rc, ldap_err2string(rc) );
return EXIT_FAILURE;
rc = ldap_initialize( &ld, ldapuri );
if( rc != LDAP_SUCCESS ) {
fprintf( stderr, "Could not create LDAP session handle (%d): %s\n",
rc, ldap_err2string(rc) );
return EXIT_FAILURE;
}
}
/* referrals */

View File

@ -558,20 +558,25 @@ main( int argc, char *argv[] )
ldaphost != NULL ? ldaphost : "<DEFAULT>",
ldapport );
}
ld = ldap_init( ldaphost, ldapport );
if( ld == NULL ) {
perror("ldapsearch: ldap_init");
return EXIT_FAILURE;
}
} else {
if ( verbose ) {
fprintf( stderr, "ldap_initialize( %s )\n",
ldapuri != NULL ? ldapuri : "<DEFAULT>" );
}
(void) ldap_initialize( &ld, ldapuri );
}
if( ld == NULL ) {
fprintf( stderr, "Could not create LDAP session handle (%d): %s\n",
rc, ldap_err2string(rc) );
return EXIT_FAILURE;
rc = ldap_initialize( &ld, ldapuri );
if( rc != LDAP_SUCCESS ) {
fprintf( stderr, "Could not create LDAP session handle (%d): %s\n",
rc, ldap_err2string(rc) );
return EXIT_FAILURE;
}
}
/* referrals */

View File

@ -663,27 +663,31 @@ main( int argc, char **argv )
(void) SIGNAL( SIGPIPE, SIG_IGN );
#endif
if( ( ldaphost != NULL || ldapport ) && ( ldapuri == NULL ) ) {
if ( verbose ) {
fprintf( stderr, "ldap_init( %s, %d )\n",
ldaphost != NULL ? ldaphost : "<DEFAULT>",
ldapport );
}
ld = ldap_init( ldaphost, ldapport );
if( ld == NULL ) {
perror("ldapsearch: ldap_init");
return EXIT_FAILURE;
}
} else {
if ( verbose ) {
fprintf( stderr, "ldap_initialize( %s )\n",
ldapuri != NULL ? ldapuri : "<DEFAULT>" );
}
(void) ldap_initialize( &ld, ldapuri );
}
if( ld == NULL ) {
fprintf( stderr, "Could not create LDAP session handle (%d): %s\n",
rc, ldap_err2string(rc) );
return EXIT_FAILURE;
rc = ldap_initialize( &ld, ldapuri );
if( rc != LDAP_SUCCESS ) {
fprintf( stderr, "Could not create LDAP session handle (%d): %s\n",
rc, ldap_err2string(rc) );
return EXIT_FAILURE;
}
}
if (deref != -1 &&

View File

@ -331,7 +331,7 @@ change_base( int type, char **base, char *s )
{
register char *cp; /* utility pointers */
char **rdns; /* for parsing */
char *output_string; /* for nice output */
char *output_string = NULL; /* for nice output */
int num_picked; /* # of selected base */
int j; /* used with num_picked */
int i = 1; /* index into choices array */

View File

@ -44,6 +44,10 @@ printbase( char *lead, char *s )
if (debug & D_TRACE)
printf("->printbase(%s, %s)\n", lead, s);
#endif
if (lead == NULL) {
printf("root");
return;
}
if (s == NULL) {
printf("%sroot\n", lead);
return;

View File

@ -697,7 +697,7 @@ int ldap_pvt_sasl_secprops(
"minssf=", sizeof("minssf")) )
{
if( isdigit( props[i][sizeof("minssf")] ) ) {
got_max_ssf++;
got_min_ssf++;
min_ssf = atoi( &props[i][sizeof("minssf")] );
} else {
return LDAP_NOT_SUPPORTED;

View File

@ -115,7 +115,7 @@ ldap_int_prepare_socket(LDAP *ld, int s, int proto )
osip_debug(ld, "ldap_prepare_socket: %d\n", s,0,0);
#ifdef TCP_NODELAY
if( proto = LDAP_PROTO_TCP ) {
if( proto == LDAP_PROTO_TCP ) {
int dummy = 1;
if ( setsockopt( s, IPPROTO_TCP, TCP_NODELAY,
(char*) &dummy, sizeof(dummy) ) == AC_SOCKET_ERROR )

View File

@ -120,7 +120,7 @@ ldap_pvt_thread_pool_init (
* but ltp_open_count == 1, so two things happen:
* 1) the first client connection fails, and 2) when
* slapd is kill'ed, it never terminates since it waits
* for all worker threads to exit.
* for all worker threads to exit. */
/* start up one thread, just so there is one. no need to
* lock the mutex right now, since no threads are running.
@ -315,8 +315,8 @@ ldap_pvt_thread_pool_destroy ( ldap_pvt_thread_pool_t *tpool, int run_pending )
ldap_pvt_thread_mutex_unlock(&pool->ltp_mutex);
} while (waiting > 0);
while (ctx = (ldap_int_thread_ctx_t *)ldap_int_thread_delist(
&pool->ltp_pending_list, NULL))
while ((ctx = (ldap_int_thread_ctx_t *)ldap_int_thread_delist(
&pool->ltp_pending_list, NULL)) != NULL)
{
free(ctx);
}

View File

@ -22,7 +22,7 @@ lutil_sigaction(int sig, lutil_sig_t func)
action.sa_handler = func;
sigemptyset( &action.sa_mask );
#ifdef SA_RESTART
action.sa_flags != SA_RESTART;
action.sa_flags |= SA_RESTART;
#endif
if( sigaction( sig, &action, &oaction ) != 0 ) {

View File

@ -154,7 +154,7 @@ access_allowed(
a = NULL;
count = 0;
while( a = acl_get( a, &count, be, op, e, desc, MAXREMATCHES, matches ) )
while((a = acl_get( a, &count, be, op, e, desc, MAXREMATCHES, matches )) != NULL)
{
int i;

View File

@ -15,7 +15,7 @@
#include "slap.h"
#include "back-ldbm.h"
static index_mask(
static slap_mask_t index_mask(
Backend *be,
AttributeDescription *desc,
char **dbname,
@ -325,7 +325,7 @@ index_entry(
/* add each attribute to the indexes */
for ( ap; ap != NULL; ap = ap->a_next ) {
for ( ; ap != NULL; ap = ap->a_next ) {
index_values( be, ap->a_desc, ap->a_vals, e->e_id, op );
}

View File

@ -61,7 +61,7 @@ int ldbm_modify_internal(
if( err != LDAP_SUCCESS ) {
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: %d %s\n",
err, text, 0);
err, *text, 0);
*text = "modify: add values failed";
}
break;
@ -72,7 +72,7 @@ int ldbm_modify_internal(
assert( err != LDAP_TYPE_OR_VALUE_EXISTS );
if( err != LDAP_SUCCESS ) {
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: %d %s\n",
err, text, 0);
err, *text, 0);
*text = "modify: delete values failed";
}
break;
@ -83,7 +83,7 @@ int ldbm_modify_internal(
assert( err != LDAP_TYPE_OR_VALUE_EXISTS );
if( err != LDAP_SUCCESS ) {
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: %d %s\n",
err, text, 0);
err, *text, 0);
*text = "modify: replace values failed";
}
break;
@ -102,7 +102,7 @@ int ldbm_modify_internal(
if( err != LDAP_SUCCESS ) {
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: %d %s\n",
err, text, 0);
err, *text, 0);
*text = "modify: (soft)add values failed";
}
break;
@ -113,7 +113,7 @@ int ldbm_modify_internal(
*text = "Invalid modify operation";
err = LDAP_OTHER;
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: %d %s\n",
err, text, 0);
err, *text, 0);
}
if ( err != LDAP_SUCCESS ) {

View File

@ -25,9 +25,6 @@
#define phoneNumberNormalize numericStringNormalize
#define telexNumberNormalize numericStringNormalize
/* unimplemented normalizers */
#define bitStringNormalize NULL
/* unimplemented pretters */
#define dnPretty NULL
#define integerPretty NULL
@ -3649,7 +3646,7 @@ struct syntax_defs_rec syntax_defs[] = {
{"( 1.3.6.1.4.1.1466.115.121.1.4 DESC 'Audio' " X_NOT_H_R ")",
SLAP_SYNTAX_BLOB, blobValidate, NULL, NULL},
{"( 1.3.6.1.4.1.1466.115.121.1.5 DESC 'Binary' " X_BINARY X_NOT_H_R ")",
SLAP_SYNTAX_BER, berValidate, NULL, NULL},
SLAP_SYNTAX_BINARY|SLAP_SYNTAX_BER, berValidate, NULL, NULL},
{"( 1.3.6.1.4.1.1466.115.121.1.6 DESC 'Bit String' )",
0, bitStringValidate, NULL, NULL },
{"( 1.3.6.1.4.1.1466.115.121.1.7 DESC 'Boolean' )",