]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/ppolicy.c
Merge remote-tracking branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_4
[openldap] / libraries / libldap / ppolicy.c
index b82208fe763f6454991b11771c4e6fd90a95ce12..31f68cf136be6ebfe4dc0b6fdc93a8ef38fe5ca0 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2004-2007 The OpenLDAP Foundation.
+ * Copyright 2004-2013 The OpenLDAP Foundation.
  * Portions Copyright 2004 Hewlett-Packard Company.
  * Portions Copyright 2004 Howard Chu, Symas Corp.
  * All rights reserved.
@@ -65,10 +65,10 @@ ldap_create_passwordpolicy_control( LDAP *ld,
        assert( LDAP_VALID( ld ) );
        assert( ctrlp != NULL );
 
-       ld->ld_errno = ldap_create_control( LDAP_CONTROL_PASSWORDPOLICYREQUEST,
-               NULL, 0, ctrlp);
+       ld->ld_errno = ldap_control_create( LDAP_CONTROL_PASSWORDPOLICYREQUEST,
+               0, NULL, 0, ctrlp );
 
-       return(ld->ld_errno);
+       return ld->ld_errno;
 }
 
 
@@ -80,8 +80,9 @@ ldap_create_passwordpolicy_control( LDAP *ld,
    ld           (IN)   An LDAP session handle.
    
    ctrl         (IN)   The address of an
-                                          LDAPControl structure, typically obtained 
-                                          by a call to ldap_find_control().
+                                          LDAPControl structure, either obtained 
+                                          by running thorugh the list of response controls or
+                                          by a call to ldap_control_find().
 
    exptimep     (OUT)  This result parameter is filled in with the number of seconds before
                                            the password will expire, if expiration is imminent