From 8ca035ffc1bec3b6654d5a71140a75c8c7f60657 Mon Sep 17 00:00:00 2001 From: Love Hornquist Astrand Date: Wed, 19 Oct 2011 04:58:22 +0200 Subject: [PATCH] Only set msg in case we have one, from Rangar Sundblad --- lib/kadm5/password_quality.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/kadm5/password_quality.c b/lib/kadm5/password_quality.c index a6f0b3ef6..eb72ba618 100644 --- a/lib/kadm5/password_quality.c +++ b/lib/kadm5/password_quality.c @@ -34,8 +34,6 @@ #include "kadm5_locl.h" #include "kadm5-pwcheck.h" -RCSID("$Id$"); - #ifdef HAVE_SYS_WAIT_H #include #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; } -- 2.11.4.GIT