From 485cecd849dcaaee4677d832dbd171b091fe1dee Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Mon, 25 Jan 2010 17:30:23 -0700 Subject: 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 --- ldap/servers/slapd/result.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ldap/servers/slapd/result.c b/ldap/servers/slapd/result.c index b085965d..7c872aaf 100644 --- a/ldap/servers/slapd/result.c +++ b/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 ); -- cgit