| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#include "config.h" |
| 23 |
|
| 24 |
#include <stdlib.h> |
| 25 |
#include <lber.h> |
| 26 |
#include <ldap.h> |
| 27 |
#include <string.h> |
| 28 |
|
| 29 |
#include "compat/ldap_compat.h" |
| 30 |
#include "compat/attrs.h" |
| 31 |
|
| 32 |
const char *ldap_passwordpolicy_err2txt(LDAPPasswordPolicyError error) |
| 33 |
{ |
| 34 |
switch (error) |
| 35 |
{ |
| 36 |
case PP_passwordExpired: return "Password expired"; |
| 37 |
case PP_accountLocked: return "Account locked"; |
| 38 |
case PP_changeAfterReset: return "Change after reset"; |
| 39 |
case PP_passwordModNotAllowed: return "Password modification not allowed"; |
| 40 |
case PP_mustSupplyOldPassword: return "Must supply old password"; |
| 41 |
case PP_insufficientPasswordQuality: return "Insufficient password quality"; |
| 42 |
case PP_passwordTooShort: return "Password too short"; |
| 43 |
case PP_passwordTooYoung: return "Password too young"; |
| 44 |
case PP_passwordInHistory: return "Password in history"; |
| 45 |
case PP_noError: return "No error"; |
| 46 |
default: return "Unknown error"; |
| 47 |
} |
| 48 |
} |