X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fpasswd.c;h=b6caab58310268cf8afd804b540637882a9f477f;hb=c3e28a5488a8011ef0352f48fca85c48679205ba;hp=ab330a81b7a347b72f0c694923046c88e41efe41;hpb=acbb5cf689a4336af05c9f259d909d8141055bac;p=openldap
diff --git a/libraries/libldap/passwd.c b/libraries/libldap/passwd.c
index ab330a81b7..b6caab5831 100644
--- a/libraries/libldap/passwd.c
+++ b/libraries/libldap/passwd.c
@@ -1,7 +1,7 @@
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software .
*
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
#include "ldap-int.h"
/*
- * LDAP Password Modify (Extended) Operation
+ * LDAP Password Modify (Extended) Operation (RFC 3062)
*/
int ldap_parse_passwd(
@@ -156,7 +156,7 @@ ldap_passwd_s(
return rc;
}
- if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, &res ) == -1 ) {
+ if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, &res ) == -1 || !res ) {
return ld->ld_errno;
}