ldap/servers/plugins/replication/windows_protocol_util.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 1e357c1cb5e45e20299faa1d28e90d934fe7accd
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Tue Aug 9 12:20:10 2011 -0600
Bug 729378 - delete user subtree container in AD + modify password in DS == DS crash
https://bugzilla.redhat.com/show_bug.cgi?id=729378
Resolves: bug 729378
Bug Description: delete user subtree container in AD + modify password in DS == DS
crash
Reviewed by: nkinder, nhosoi (Thanks!)
Branch: master
Fix Description: Check for NULL DN in send_password_modify - return error
if the DN is NULL.
Platforms tested: RHEL6 x86_64, Windows 2008 64-bit
Flag Day: no
Doc impact: no
diff --git a/ldap/servers/plugins/replication/windows_protocol_util.c
b/ldap/servers/plugins/replication/windows_protocol_util.c
index 51b26fd..2a5960e 100644
--- a/ldap/servers/plugins/replication/windows_protocol_util.c
+++ b/ldap/servers/plugins/replication/windows_protocol_util.c
@@ -770,9 +770,13 @@ static int
send_password_modify(Slapi_DN *sdn, char *password, Private_Repl_Protocol *prp)
{
ConnResult pw_return = 0;
- int is_nt4 = windows_private_get_isnt4(prp->agmt);
- if (is_nt4)
+ if (!sdn || !slapi_sdn_get_dn(sdn) || !password)
+ {
+ return CONN_OPERATION_FAILED;
+ }
+
+ if (windows_private_get_isnt4(prp->agmt))
{
/* NT4 just wants a plaintext password */
Slapi_Mods smods = {0};