From 7262bf2a4374f7b1fbb8413066a93aa773df17a8 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 --- 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 991864bae4..7fd794d1ed 100644 --- a/cf-agent/verify_users_pam.c +++ b/cf-agent/verify_users_pam.c @@ -673,7 +673,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 d950a2571bfaba945e0702c1bf2fadc02e7599da 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 --- 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 7fd794d1ed..53ffa692ca 100644 --- a/cf-agent/verify_users_pam.c +++ b/cf-agent/verify_users_pam.c @@ -643,19 +643,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; }