From 8ff144f7d5aa1c517e5ae91e819ac1daa891a68e Mon Sep 17 00:00:00 2001 From: Ihor Aleksandrychiev Date: Fri, 5 Dec 2025 14:41:26 +0200 Subject: [PATCH 1/2] Changed ChangePasswordHashUsingChpass logging info Removed unnecessary information Ticket: ENT-13573 Signed-off-by: Ihor Aleksandrychiev (cherry picked from commit 7262bf2a4374f7b1fbb8413066a93aa773df17a8) --- cf-agent/verify_users_pam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cf-agent/verify_users_pam.c b/cf-agent/verify_users_pam.c index b5a27f95e9..9b74afc9ab 100644 --- a/cf-agent/verify_users_pam.c +++ b/cf-agent/verify_users_pam.c @@ -680,7 +680,7 @@ static bool ChangePasswordHashUsingChpass(const char *puser, const char *passwor StringAppend(cmd, "\' ", sizeof(cmd)); StringAppend(cmd, puser, sizeof(cmd)); - Log(LOG_LEVEL_VERBOSE, "Changing password hash for user '%s'. (command: '%s')", puser, cmd); + Log(LOG_LEVEL_VERBOSE, "Changing password hash for user '%s' using chpass.", puser); return ExecuteUserCommand(puser, cmd, sizeof(cmd), "changing", "Changing"); } From deb3b2ace111ca7d67138241051cdc844243d7ad Mon Sep 17 00:00:00 2001 From: Ihor Aleksandrychiev Date: Fri, 5 Dec 2025 15:09:20 +0200 Subject: [PATCH 2/2] Do not log executed command by ExecuteUserCommand Signed-off-by: Ihor Aleksandrychiev (cherry picked from commit d950a2571bfaba945e0702c1bf2fadc02e7599da) --- cf-agent/verify_users_pam.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cf-agent/verify_users_pam.c b/cf-agent/verify_users_pam.c index 9b74afc9ab..eaf91419de 100644 --- a/cf-agent/verify_users_pam.c +++ b/cf-agent/verify_users_pam.c @@ -650,19 +650,19 @@ static bool ExecuteUserCommand(const char *puser, const char *cmd, size_t sizeof return false; } - Log(LOG_LEVEL_VERBOSE, "%s user '%s'. (command: '%s')", cap_action_msg, puser, cmd); + Log(LOG_LEVEL_VERBOSE, "ExecuteUserCommand: %s user '%s'.", cap_action_msg, puser); FILE *fptr = cf_popen(cmd, "w", true); if (!fptr) { - Log(LOG_LEVEL_ERR, "Command returned error while %s user '%s'. (Command line: '%s')", action_msg, puser, cmd); + Log(LOG_LEVEL_ERR, "ExecuteUserCommand: returned error while %s user '%s'.", action_msg, puser); return false; } int status = cf_pclose(fptr); if (status) { - Log(LOG_LEVEL_ERR, "'%s' returned non-zero status: %i\n", cmd, status); + Log(LOG_LEVEL_ERR, "ExecuteUserCommand: returned non-zero status: %i\n", status); return false; }