aboutsummaryrefslogtreecommitdiff
path: root/src/lib/kadm5/srv/pwqual_empty.c
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2010-08-31 01:40:19 +0000
committerGreg Hudson <ghudson@mit.edu>2010-08-31 01:40:19 +0000
commit71f887d2566241acb305158a0167fd9b7f8ac387 (patch)
tree8e33c94e55e806029ac6ecb36a78424e06d93d76 /src/lib/kadm5/srv/pwqual_empty.c
parent660628789b79e8a52dd046dda553d6de8d4d87bb (diff)
downloadkrb5-71f887d2566241acb305158a0167fd9b7f8ac387.zip
krb5-71f887d2566241acb305158a0167fd9b7f8ac387.tar.gz
krb5-71f887d2566241acb305158a0167fd9b7f8ac387.tar.bz2
For the password quality interface:
* Add a languages argument to the check method to allow localization of error messages (currently no languages are ever passed, though). * Add an error code KADM5_PASS_Q_GENERIC. * In most built-in modules and the combo module, set an error message with krb5_set_error_message. git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24279 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/kadm5/srv/pwqual_empty.c')
-rw-r--r--src/lib/kadm5/srv/pwqual_empty.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/kadm5/srv/pwqual_empty.c b/src/lib/kadm5/srv/pwqual_empty.c
index ba25502..df3505a 100644
--- a/src/lib/kadm5/srv/pwqual_empty.c
+++ b/src/lib/kadm5/srv/pwqual_empty.c
@@ -35,12 +35,15 @@
static krb5_error_code
empty_check(krb5_context context, krb5_pwqual_moddata data,
const char *password, const char *policy_name,
- krb5_principal princ)
+ krb5_principal princ, const char **languages)
{
/* Unlike other built-in modules, this one operates even for principals
* with no password policy. */
- if (*password == '\0')
+ if (*password == '\0') {
+ krb5_set_error_message(context, KADM5_PASS_Q_TOOSHORT,
+ "Empty passwords are not allowed");
return KADM5_PASS_Q_TOOSHORT;
+ }
return 0;
}