Only set msg in case we have one, from Rangar Sundblad

This commit is contained in:
Love Hornquist Astrand
2011-10-19 04:58:22 +02:00
parent 6bcdba3a38
commit 33f717edb2

View File

@@ -34,8 +34,6 @@
#include "kadm5_locl.h"
#include "kadm5-pwcheck.h"
RCSID("$Id$");
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
@@ -473,7 +471,8 @@ kadm5_check_password_quality (krb5_context context,
NULL);
if (v == NULL) {
msg = (*passwd_quality_check) (context, principal, pwd_data);
krb5_set_error_message(context, 0, "password policy failed: %s", msg);
if (msg)
krb5_set_error_message(context, 0, "password policy failed: %s", msg);
return msg;
}