]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/passwd.c
slashpath from HEAD
[openldap] / libraries / libldap / passwd.c
index c4ab24abd5896bf0337c7f7218e08d7dca83faa2..57428292c8e667bfd234b6bcaa08c6a8d8c2b6a0 100644 (file)
@@ -1,7 +1,20 @@
 /* $OpenLDAP$ */
-/*
- * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2004 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
+ */
+/* ACKNOWLEDGEMENTS:
+ * This program was orignally developed by Kurt D. Zeilenga for inclusion in
+ * OpenLDAP Software.
  */
 
 #include "portable.h"
 #include "ldap-int.h"
 
 /*
- * LDAP Password Modify (Extended) Operation <RFC 3???>
+ * LDAP Password Modify (Extended) Operation <RFC 3062>
  */
 
 int ldap_parse_passwd(
        LDAP *ld,
        LDAPMessage *res,
-       struct berval **newpasswd )
+       struct berval *newpasswd )
 {
        int rc;
        char *retoid = NULL;
@@ -31,7 +44,8 @@ int ldap_parse_passwd(
        assert( res != NULL );
        assert( newpasswd != NULL );
 
-       *newpasswd = NULL;
+       newpasswd->bv_val = NULL;
+       newpasswd->bv_len = 0;
 
        rc = ldap_parse_extended_result( ld, res, &retoid, &retdata, 0 );
 
@@ -49,7 +63,7 @@ int ldap_parse_passwd(
                }
 
                /* we should check the tag */
-               tag = ber_scanf( ber, "{O}", newpasswd );
+               tag = ber_scanf( ber, "{o}", newpasswd );
                ber_free( ber, 1 );
 
                if( tag == LBER_ERROR ) {
@@ -129,7 +143,7 @@ ldap_passwd_s(
        struct berval   *user,
        struct berval   *oldpw,
        struct berval   *newpw,
-       struct berval **newpasswd,
+       struct berval *newpasswd,
        LDAPControl **sctrls,
        LDAPControl **cctrls )
 {