]> git.sur5r.net Git - openldap/commitdiff
Additional struct berval DN changes...
authorKurt Zeilenga <kurt@openldap.org>
Wed, 26 Dec 2001 23:26:55 +0000 (23:26 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 26 Dec 2001 23:26:55 +0000 (23:26 +0000)
servers/slapd/backglue.c
servers/slapd/bind.c
servers/slapd/config.c
servers/slapd/init.c
servers/slapd/proto-slap.h
servers/slapd/result.c
servers/slapd/sasl.c

index e331ca85ec2d64025f26e20bbb7077ab07cefd55..a6fbdc6e7910bdcc11674387baf1a357956593e8 100644 (file)
@@ -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;
index d980c36bb083957c0d27a185acfbbd1d698a1da0..2d51bf2f577b364b8dbc1ea853f8c656286debdd 100644 (file)
@@ -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 );
index ad0449ece3130317064f9393838a3d1923d83803..3f5c60868ec12a7962ffe3250b419652cfbad760 100644 (file)
@@ -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 */
index c26fe7b8c0bbfe4deee90b75540562f5453230df..eabb73b13b0394f33f547d22a3ba568aea6034c3 100644 (file)
@@ -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()
index b23655286b96888e01c3739328acc52e086d4676..02d2afc86cf3c9c05050f4b84c1fd39119f5cdb8 100644 (file)
@@ -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,
index 8c175d9313be02a3b94854cf7d1ab5d0012f8223..a4017a0234be0190d8ec3040e0d2295842527ade 100644 (file)
@@ -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 );
index ea3dc20aa81cdd15e3d3a109e6b2a06886bd988f..3e5bd4bb278aa7288c309957df6a36965ee676f3 100644 (file)
@@ -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 ? "<continuing>" : 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 ? "<continuing>" : 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 ? "<continuing>":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 ? "<continuing>":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