]> git.sur5r.net Git - openldap/commitdiff
Fix Statslog messages
authorHoward Chu <hyc@openldap.org>
Tue, 17 Dec 2002 00:23:36 +0000 (00:23 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 17 Dec 2002 00:23:36 +0000 (00:23 +0000)
servers/slapd/daemon.c
servers/slapd/sasl.c

index c69b5a10d28335bd21f23ad61527edfe371d1f79..5aec3841081e039d8708fd20968abb1fa7b5c667 100644 (file)
@@ -1645,7 +1645,7 @@ slapd_daemon_task(
                                {
                                        /* DENY ACCESS */
                                        Statslog( LDAP_DEBUG_STATS,
-                                               "fd=%ld host access from %s (%s) denied.\n",
+                                               "fd=%ld DENIED from %s (%s)",
                                                (long) s,
                                                dnsname != NULL ? dnsname : SLAP_STRING_UNKNOWN,
                                                peeraddr != NULL ? peeraddr : SLAP_STRING_UNKNOWN,
@@ -1694,8 +1694,8 @@ slapd_daemon_task(
                        }
 
                        Statslog( LDAP_DEBUG_STATS,
-                               "daemon: conn=%ld fd=%ld connection from %s "
-                               "(%s) accepted.\n",
+                               "conn=%ld fd=%ld ACCEPT from %s "
+                               "(%s)\n",
                                id, (long) s,
                                peername,
                                slap_listeners[l]->sl_name.bv_val,
index 9e3d72ae5589ffcbe103cd618be88a64693b88e2..0d364413a70e6ea60309bccc3e4d209bea4ea854 100644 (file)
@@ -740,7 +740,7 @@ slap_sasl_authorize(
        /* Nothing to do if no authzID was given */
        if ( !auxvals[1].name || !auxvals[1].values ) {
                conn->c_sasl_dn = authcDN;
-               return SASL_OK;
+               goto ok;
        }
        
        AC_MEMCPY( &authzDN, auxvals[1].values[0], sizeof(authzDN) );
@@ -764,6 +764,7 @@ slap_sasl_authorize(
        }
 
        conn->c_sasl_dn = authzDN;
+ok:
        if (conn->c_sasl_bindop) {
                Statslog( LDAP_DEBUG_STATS,
                        "conn=%lu op=%lu BIND authcid=\"%s\"\n",
@@ -849,8 +850,7 @@ slap_sasl_authorize(
 #endif
 
                conn->c_sasl_dn = authcDN;
-               *errstr = NULL;
-               return SASL_OK;
+               goto ok;
        }
        rc = slap_sasl_getdn( conn, (char *)authzid, 0, realm,
                &authzDN, SLAP_GETDN_AUTHZID );
@@ -877,7 +877,9 @@ slap_sasl_authorize(
                ch_free( authzDN.bv_val );
                return SASL_NOAUTHZ;
        }
+       conn->c_sasl_dn = authzDN;
 
+ok:
 #ifdef NEW_LOGGING
        LDAP_LOG( TRANSPORT, RESULTS, 
                "slap_sasl_authorize: conn %d authorization allowed\n",
@@ -895,7 +897,6 @@ slap_sasl_authorize(
                        auth_identity, 0, 0);
        }
 
-       conn->c_sasl_dn = authzDN;
        *errstr = NULL;
        return SASL_OK;
 }