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)
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
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;
+ }
}
{
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 */
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 */
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 */
(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 &&
{
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 */
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;
"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;
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 )
* 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.
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);
}
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 ) {
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;
#include "slap.h"
#include "back-ldbm.h"
-static index_mask(
+static slap_mask_t index_mask(
Backend *be,
AttributeDescription *desc,
char **dbname,
/* 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 );
}
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;
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;
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;
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;
*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 ) {
#define phoneNumberNormalize numericStringNormalize
#define telexNumberNormalize numericStringNormalize
-/* unimplemented normalizers */
-#define bitStringNormalize NULL
-
/* unimplemented pretters */
#define dnPretty NULL
#define integerPretty NULL
{"( 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' )",