/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2003-2005 The OpenLDAP Foundation.
+ * Copyright 2003-2006 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
(char **)&rs->sr_matched,
(char **)&rs->sr_text,
NULL, NULL, 0 );
-#ifndef LDAP_NULL_IS_NULL
- if ( rs->sr_matched && rs->sr_matched[ 0 ] == '\0' ) {
- free( (char *)rs->sr_matched );
- rs->sr_matched = NULL;
- }
- if ( rs->sr_text && rs->sr_text[ 0 ] == '\0' ) {
- free( (char *)rs->sr_text );
- rs->sr_text = NULL;
- }
-#endif /* LDAP_NULL_IS_NULL */
+
if ( rc == LDAP_SUCCESS ) {
if ( rs->sr_err == LDAP_SUCCESS ) {
struct berval newpw;
-
+
+ /* this never happens because
+ * the frontend is generating
+ * the new password, so when
+ * the passwd exop is proxied,
+ * it never delegates password
+ * generation to the remote server
+ */
rc = ldap_parse_passwd( lc->lc_ld, res,
- &newpw);
+ &newpw );
if ( rc == LDAP_SUCCESS &&
!BER_BVISNULL( &newpw ) )
{
(char **)&rs->sr_matched,
(char **)&rs->sr_text,
NULL, NULL, 0 );
-#ifndef LDAP_NULL_IS_NULL
- if ( rs->sr_matched && rs->sr_matched[ 0 ] == '\0' ) {
- free( (char *)rs->sr_matched );
- rs->sr_matched = NULL;
- }
- if ( rs->sr_text && rs->sr_text[ 0 ] == '\0' ) {
- free( (char *)rs->sr_text );
- rs->sr_text = NULL;
- }
-#endif /* LDAP_NULL_IS_NULL */
if ( rc == LDAP_SUCCESS ) {
if ( rs->sr_err == LDAP_SUCCESS ) {
rc = ldap_parse_extended_result( lc->lc_ld, res,