123
edits
(Typo) |
(Update to reflect correct function names) |
||
| Line 2,950: | Line 2,950: | ||
<br> ldap_search_ext(), ldap_abandon_ext, ldap_get_entry_controls(), ldap_parse_entrychange_control(), ldap_control_free() | <br> ldap_search_ext(), ldap_abandon_ext, ldap_get_entry_controls(), ldap_parse_entrychange_control(), ldap_control_free() | ||
=== | === ldap_create_passwordpolicy_control() === | ||
The | The ldap_create_passwordpolicy_control() function creates a control that requests information about the status of a user account. | ||
'''Note:''' | '''Note:''' ldap_create_passwordpolicy_control() implements an extension to the LDAP v3 supported by Directory Server. In order for the control to work, the LDAP server that you are connecting to must support the server control for password policy (OID <tt>1.3.6.1.4.1.42.2.27.8.5.1</tt>, or <tt>LDAP_CONTROL_PASSWD_POLICY</tt>). | ||
Calling | Calling ldap_create_passwordpolicy_control() creates an LDAP control that you can pass to the ldap_simple_bind() functions to retrieve password policy information from bind, modify, add, compare, and potentially extended operation responses including password policy response controls. You call ldap_parse_passwordpolicy_control() function on the controls returned with an entry to retrieve a LDAPPasswordPolicyError structure containing information about the status of the account. When you are done with the search, you should free the control by calling the ldap_control_free() function. | ||
<br> '''Syntax''' | <br> '''Syntax''' | ||
<pre>#include <ldap.h> | <pre>#include <ldap.h> | ||
LDAP_API(int) LDAP_CALL ldap_create_pwdpolicy_control( LDAP *ld, | LDAP_API(int) LDAP_CALL ldap_create_passwordpolicy_control( LDAP *ld, | ||
LDAPControl **ctrlp );</pre> | |||
'''Parameters''' | |||
<br> | |||
{| width="100%" cellspacing="1" cellpadding="1" border="1" summary="ldap_create_pwdpolicy_control() Function Parameters" | |||
|+ ldap_create_pwdpolicy_control() Function Parameters | |||
|- | |||
! scope="col" | Parameter | |||
! scope="col" | Description | |||
|- | |||
| ld | |||
| Pointer to an LDAP structure containing information about the connection to the LDAP server. | |||
|- | |||
| ctrlp | |||
| Pointer to an LDAPControl structure created by this function. When you are done using this control, you should free it by calling ldap_control_free(). | |||
|} | |||
<br> '''Returns''' | |||
<br> One of the following values: | |||
*LDAP_SUCCESS if successful. | |||
*LDAP_PARAM_ERROR if an invalid parameter was passed to the function. | |||
*LDAP_NO_MEMORY if memory cannot be allocated. | |||
*LDAP_ENCODING_ERROR if an error occurred when BER-encoding the control. | |||
<br> '''See Also''' | |||
<br> ldap_parse_passwordpolicy_control(), LDAPPasswordPolicyError | |||
=== ldap_create_passwordpolicy_control_ext() === | |||
The ldap_create_passwordpolicy_control_ext() function creates a control that requests information about the status of a user account. | |||
'''Note:''' ldap_create_passwordpolicy_control_ext() implements an extension to the LDAP v3 supported by Directory Server. In order for the control to work, the LDAP server that you are connecting to must support the server control for password policy (OID <tt>1.3.6.1.4.1.42.2.27.8.5.1</tt>, or <tt>LDAP_CONTROL_PASSWD_POLICY</tt>). | |||
Calling ldap_create_passwordpolicy_control_ext() creates an LDAP control that you can pass to the ldap_simple_bind() functions to retrieve password policy information from bind, modify, add, compare, and potentially extended operation responses including password policy response controls. You call ldap_parse_passwordpolicy_control() function on the controls returned with an entry to retrieve a LDAPPasswordPolicyError structure containing information about the status of the account. When you are done with the search, you should free the control by calling the ldap_control_free() function. | |||
<br> '''Syntax''' | |||
<pre>#include <ldap.h> | |||
LDAP_API(int) LDAP_CALL ldap_create_passwordpolicy_control_ext( LDAP *ld, | |||
const char ctl_iscritical, LDAPControl **ctrlp );</pre> | const char ctl_iscritical, LDAPControl **ctrlp );</pre> | ||
'''Parameters''' | '''Parameters''' | ||
| Line 2,996: | Line 3,038: | ||
<br> '''See Also''' | <br> '''See Also''' | ||
<br> | <br> ldap_parse_passwordpolicy_control(), LDAPPasswordPolicyError | ||
=== ldap_create_proxiedauth_control() === | === ldap_create_proxiedauth_control() === | ||
edits