36.5. slapi_pwpolicy_make_response_control()

Description

Sends back detailed information about password policies.

Syntax

#include "slapi-plugin.h"
int slapi_pwpolicy_make_response_control (Slapi_PBlock *pb, int seconds, int logins, int error)

Parameters

This function takes the following parameter:

pb
Parameter block.
Returns

This function returns any of the following values:

  • LDAP_PWPOLICY_PWDEXPIRED (0), if the password for the entry has expired.
  • LDAP_PWPOLICY_ACCTLOCKED (1), if the account is locked (after repeated failed login attempts).
  • LDAP_PWPOLICY_CHGAFTERRESET (2), if the password must be changed after an administrator as reset it.
  • LDAP_PWPOLICY_PWDMODNOTALLOWED (3), if a password cannot be modified by the user.
  • LDAP_PWPOLICY_MUSTSUPPLYOLDPWD (4), if the old password is necessary for a modification.
  • LDAP_PWPOLICY_INVALIDPWDSYNTAX (5), if the password violates the policy; e.g., not using special characters or capital letters if they are required.
  • LDAP_PWPOLICY_PWDTOOSHORT (6), if the new password is shorter than the minimum length set by the policy.
  • LDAP_PWPOLICY_PWDTOOYOUNG (7), if there has been a minimum age set before a password can be modified.
  • LDAP_PWPOLICY_PWDINHISTORY (8), if old passwords are stored in history.