From d150c9989bc01dcabc0a9a4c8f546abf203fd0ec Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Wed, 26 Dec 2018 16:45:59 +1100 Subject: [PATCH] kpasswd: don't log "Changing password for %s" when setting password Fix a regression introduced in c89d3f3b where administrative password changes would be logged as user password changes, if enforce_on_admin_set was set. --- kpasswd/kpasswdd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kpasswd/kpasswdd.c b/kpasswd/kpasswdd.c index cc115ce18..f7bb4474b 100644 --- a/kpasswd/kpasswdd.c +++ b/kpasswd/kpasswdd.c @@ -379,6 +379,8 @@ change (krb5_auth_context auth_context, goto out; } krb5_warnx (context, "%s is changing password for %s", admin, client); + } else { + krb5_warnx (context, "Changing password for %s", client); } /* @@ -402,7 +404,6 @@ change (krb5_auth_context auth_context, KRB5_KPASSWD_SOFTERROR, pwd_reason); goto out; } - krb5_warnx (context, "Changing password for %s", client); } ret = krb5_data_realloc(pwd_data, pwd_data->length + 1);