Browse Source

Net::LDAP password modify extop breaks; msgid in response is 0xFF

https://bugzilla.redhat.com/show_bug.cgi?id=554887
Resolves: bug 554887
Bug Description: Net::LDAP password modify extop breaks; msgid in response is 0xFF
Reviewed by: ???
Branch: HEAD
Fix Description: We use a fake conn for the internal password modify operation
so that we can use the real credentials.  Unfortunately, this messes up the
result code - because there is a real, non-NULL conn, it thinks it needs to
send the result back to a real client rather than handle it as an internal
operation.  It looks as though o_result_handler is only used for internal
operations.  The fix is to change the result handling code to check for
an internal op OR conn == NULL to see if we should use the result handler
instead.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
Rich Megginson 16 years ago
parent
commit
485cecd849
1 changed files with 3 additions and 1 deletions
  1. 3 1
      ldap/servers/slapd/result.c

+ 3 - 1
ldap/servers/slapd/result.c

@@ -291,6 +291,7 @@ send_ldap_result_ext(
 	int             flush_ber_element = 1;
   	Slapi_Operation *operation;
 	char *dn;
+	int internal_op;
 	passwdPolicy *pwpolicy = NULL;
 	
 	slapi_pblock_get (pb, SLAPI_OPERATION, &operation);
@@ -354,7 +355,8 @@ send_ldap_result_ext(
 		break;
 	}
 
-	if ( conn == NULL ) {
+	internal_op = operation_is_flag_set( operation, OP_FLAG_INTERNAL );
+	if ( ( conn == NULL ) || ( internal_op ) ) {
 		if ( operation->o_result_handler != NULL ) {
 			operation->o_result_handler( conn, operation, err,
 			    matched, text, nentries, urls );