Browse Source

Ticket #48904 - syncrepl search returning error 329; plugin sending a bad error code

Description: Implemented based upon the analysis by [email protected].
> the problem is in the new function send_ldap_intermediate() introduced for
> sync_repl, it calls log_result (....,rc, ) where rc is the return code of
> ber_put_seq(). It should call log_result( ...,1, ) if rc==LBER_ERROR and
> (...,0,..) else.

Instead of using 1 and 0, use ldap code LDAP_OPERATIONS_ERROR and LDAP_SUCCESS,
respectively.

https://fedorahosted.org/389/ticket/48904

Reviewed by [email protected] (Thank you, William!!)
Noriko Hosoi 9 years ago
parent
commit
0157eb14e3
1 changed files with 7 additions and 5 deletions
  1. 7 5
      ldap/servers/slapd/result.c

+ 7 - 5
ldap/servers/slapd/result.c

@@ -255,17 +255,19 @@ log_and_return:
 	 * set o_status
 	 */
 
+	if (rc == LBER_ERROR) {
+		rc = LDAP_OPERATIONS_ERROR;
+	} else {
+		rc = LDAP_SUCCESS;
+	}
+
 	if ( logit && operation_is_flag_set( operation,
 	    OP_FLAG_ACTION_LOG_ACCESS )) {
 		log_result( pb, operation, rc, tag, 0 );
 	}
 
 	LDAPDebug( LDAP_DEBUG_TRACE, "<= send_ldap_intermediate\n", 0, 0, 0 );
-	if (rc == LBER_ERROR) {
-		return(1);
-	} else {
-		return(0);
-	}
+	return rc;
 }
 
 static int