From: Kurt Zeilenga Date: Wed, 26 Dec 2001 23:26:55 +0000 (+0000) Subject: Additional struct berval DN changes... X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~476 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ef7a99ff99f84ae144e72b949b0103e3670c6b93;p=openldap Additional struct berval DN changes... --- diff --git a/servers/slapd/backglue.c b/servers/slapd/backglue.c index e331ca85ec..a6fbdc6e79 100644 --- a/servers/slapd/backglue.c +++ b/servers/slapd/backglue.c @@ -776,7 +776,7 @@ int glue_sub_init( ) { int i, j; - int cont = num_subs; + int cont = num_subordinates; BackendDB *b1, *be; BackendInfo *bi; glueinfo *gi; diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index d980c36bb0..2d51bf2f57 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -292,7 +292,7 @@ do_bind( edn = NULL; rc = slap_sasl_bind( conn, op, - pdn->bv_val, ndn->bv_val, + pdn, ndn, &cred, &edn, &ssf ); ldap_pvt_thread_mutex_lock( &conn->c_mutex ); diff --git a/servers/slapd/config.c b/servers/slapd/config.c index ad0449ece3..3f5c60868e 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -48,7 +48,7 @@ char *ldap_srvtab = ""; char *default_passwd_hash; struct berval default_search_base = { 0, NULL }; struct berval default_search_nbase = { 0, NULL }; -int num_subs = 0; +unsigned num_subordinates = 0; ber_len_t sockbuf_max_incoming = SLAP_SB_MAX_INCOMING_DEFAULT; ber_len_t sockbuf_max_incoming_auth= SLAP_SB_MAX_INCOMING_AUTH; @@ -863,7 +863,7 @@ read_config( const char *fname ) #endif } else { be->be_glueflags |= SLAP_GLUE_SUBORDINATE; - num_subs++; + num_subordinates++; } /* set database suffix */ diff --git a/servers/slapd/init.c b/servers/slapd/init.c index c26fe7b8c0..eabb73b13b 100644 --- a/servers/slapd/init.c +++ b/servers/slapd/init.c @@ -45,15 +45,14 @@ ldap_pvt_thread_mutex_t gmtime_mutex; ldap_pvt_thread_mutex_t passwd_mutex; #endif -int num_conns; -long num_ops_initiated; -long num_ops_completed; +unsigned long num_ops_initiated; +unsigned long num_ops_completed; ldap_pvt_thread_mutex_t num_ops_mutex; -long num_entries_sent; -long num_refs_sent; -long num_bytes_sent; -long num_pdu_sent; +unsigned long num_entries_sent; +unsigned long num_refs_sent; +unsigned long num_bytes_sent; +unsigned long num_pdu_sent; ldap_pvt_thread_mutex_t num_sent_mutex; /* * these mutexes must be used when calling the entry2str() diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index b23655286b..02d2afc86c 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -375,6 +375,7 @@ LDAP_SLAPD_F (int) dnIsSuffix LDAP_P(( #define SLAP_DN_MIGRATION #ifdef SLAP_DN_MIGRATION + /* These routines are deprecated!!! */ LDAP_SLAPD_F (char *) dn_validate LDAP_P(( char *dn )); LDAP_SLAPD_F (char *) dn_normalize LDAP_P(( char *dn )); LDAP_SLAPD_F (char *) dn_parent LDAP_P(( Backend *be, const char *dn )); @@ -462,15 +463,18 @@ LDAP_SLAPD_F (void) filter_print LDAP_P(( Filter *f )); */ LDAP_SLAPD_F (int) test_filter LDAP_P(( - Backend *be, Connection *conn, Operation *op, Entry *e, Filter *f )); + Backend *be, Connection *conn, Operation *op, + Entry *e, Filter *f )); /* * limits.c */ LDAP_SLAPD_F (int) get_limits LDAP_P(( - Backend *be, struct berval *ndn, struct slap_limits_set **limit )); + Backend *be, struct berval *ndn, + struct slap_limits_set **limit )); LDAP_SLAPD_F (int) parse_limits LDAP_P(( - Backend *be, const char *fname, int lineno, int argc, char **argv )); + Backend *be, const char *fname, int lineno, + int argc, char **argv )); LDAP_SLAPD_F (int) parse_limit LDAP_P(( const char *arg, struct slap_limits_set *limit )); @@ -664,7 +668,7 @@ LDAP_SLAPD_F (int) slap_sasl_close( Connection *c ); LDAP_SLAPD_F (int) slap_sasl_bind LDAP_P(( Connection *conn, Operation *op, - const char *dn, const char *ndn, + struct berval *dn, struct berval *ndn, struct berval *cred, char **edn, slap_ssf_t *ssf )); @@ -935,7 +939,7 @@ LDAP_SLAPD_F (Attribute *) slap_operational_hasSubordinate( int has ); #define SLAP_SB_MAX_INCOMING_DEFAULT ((1<<18) - 1) #define SLAP_SB_MAX_INCOMING_AUTH ((1<<24) - 1) -LDAP_SLAPD_V(int) num_subs; +LDAP_SLAPD_V(unsigned) num_subordinates; LDAP_SLAPD_V (ber_len_t) sockbuf_max_incoming; LDAP_SLAPD_V (ber_len_t) sockbuf_max_incoming_auth; @@ -968,14 +972,14 @@ LDAP_SLAPD_V (int) nSaslRegexp; LDAP_SLAPD_V (SaslRegexp_t*) SaslRegexp; LDAP_SLAPD_V (ldap_pvt_thread_mutex_t) num_sent_mutex; -LDAP_SLAPD_V (long) num_bytes_sent; -LDAP_SLAPD_V (long) num_pdu_sent; -LDAP_SLAPD_V (long) num_entries_sent; -LDAP_SLAPD_V (long) num_refs_sent; +LDAP_SLAPD_V (unsigned long) num_bytes_sent; +LDAP_SLAPD_V (unsigned long) num_pdu_sent; +LDAP_SLAPD_V (unsigned long) num_entries_sent; +LDAP_SLAPD_V (unsigned long) num_refs_sent; LDAP_SLAPD_V (ldap_pvt_thread_mutex_t) num_ops_mutex; -LDAP_SLAPD_V (long) num_ops_completed; -LDAP_SLAPD_V (long) num_ops_initiated; +LDAP_SLAPD_V (unsigned long) num_ops_completed; +LDAP_SLAPD_V (unsigned long) num_ops_initiated; LDAP_SLAPD_V (char *) slapd_pid_file; LDAP_SLAPD_V (char *) slapd_args_file; @@ -1018,9 +1022,6 @@ LDAP_SLAPD_F (void) slapd_remove LDAP_P((ber_socket_t s, int wake)); LDAP_SLAPD_F (RETSIGTYPE) slap_sig_shutdown LDAP_P((int sig)); LDAP_SLAPD_F (RETSIGTYPE) slap_sig_wake LDAP_P((int sig)); -LDAP_SLAPD_F (int) config_info LDAP_P(( - Entry **e, const char **text )); - LDAP_SLAPD_F (int) root_dse_info LDAP_P(( Connection *conn, Entry **e, diff --git a/servers/slapd/result.c b/servers/slapd/result.c index 8c175d9313..a4017a0234 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -1212,7 +1212,7 @@ str2result( } else { #ifdef NEW_LOGGING LDAP_LOG(( "operation", LDAP_LEVEL_INFO, - "str2result: (%s) unknown.\n", s )); + "str2result: (%s) unknown.\n", s )); #else Debug( LDAP_DEBUG_ANY, "str2result (%s) unknown\n", s, 0, 0 ); diff --git a/servers/slapd/sasl.c b/servers/slapd/sasl.c index ea3dc20aa8..3e5bd4bb27 100644 --- a/servers/slapd/sasl.c +++ b/servers/slapd/sasl.c @@ -603,11 +603,11 @@ int slap_sasl_close( Connection *conn ) int slap_sasl_bind( Connection *conn, Operation *op, - const char *dn, - const char *ndn, + struct berval *dn, + struct berval *ndn, struct berval *cred, - char **edn, - slap_ssf_t *ssfp ) + char **edn, + slap_ssf_t *ssfp ) { int rc = 1; @@ -620,15 +620,17 @@ int slap_sasl_bind( #ifdef NEW_LOGGING LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY, - "sasl_bind: conn %ld dn=\"%s\" mech=%s datalen=%ld\n", - conn->c_connid, dn, - conn->c_sasl_bind_in_progress ? "" : conn->c_sasl_bind_mech, - cred ? cred->bv_len : 0 )); + "sasl_bind: conn %ld dn=\"%s\" mech=%s datalen=%ld\n", + conn->c_connid, + dn->bv_len ? dn->bv_val : "", + conn->c_sasl_bind_in_progress ? "" : conn->c_sasl_bind_mech, + cred ? cred->bv_len : 0 )); #else Debug(LDAP_DEBUG_ARGS, - "==> sasl_bind: dn=\"%s\" mech=%s datalen=%ld\n", dn, - conn->c_sasl_bind_in_progress ? "":conn->c_sasl_bind_mech, - cred ? cred->bv_len : 0 ); + "==> sasl_bind: dn=\"%s\" mech=%s datalen=%ld\n", + dn->bv_len ? dn->bv_val : "", + conn->c_sasl_bind_in_progress ? "":conn->c_sasl_bind_mech, + cred ? cred->bv_len : 0 ); #endif @@ -662,7 +664,7 @@ int slap_sasl_bind( if ( sc != SASL_OK ) { #ifdef NEW_LOGGING LDAP_LOG(( "sasl", LDAP_LEVEL_ERR, - "slap_sasl_bind: getprop(USERNAME) failed: %d\n", sc )); + "slap_sasl_bind: getprop(USERNAME) failed: %d\n", sc )); #else Debug(LDAP_DEBUG_TRACE, "slap_sasl_bind: getprop(USERNAME) failed!\n", @@ -722,7 +724,7 @@ int slap_sasl_bind( #ifdef NEW_LOGGING LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY, - "slap_sasl_bind: rc=%d\n", rc )); + "slap_sasl_bind: rc=%d\n", rc )); #else Debug(LDAP_DEBUG_TRACE, "<== slap_sasl_bind: rc=%d\n", rc, 0, 0); #endif