]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/passwd.c
Merge remote branch 'origin/mdb.master'
[openldap] / libraries / libldap / passwd.c
index ab330a81b7a347b72f0c694923046c88e41efe41..93ecd9bbb7450521f10b04f31424ce633d8cd7af 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2011 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 <RFC 3062>
+ * 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;
        }