Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pam: sshd patch: Update the log message #10032

Merged
merged 1 commit into from
Feb 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/tacacs/pam/0007-handle-bad-password-set-by-sshd.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From f2687e7a442c83e19190695021fb9a60fe07ba60 Mon Sep 17 00:00:00 2001
From 4ef102dfa137c2c6e3dd63c2d16f2966b6f5add8 Mon Sep 17 00:00:00 2001
From: Renuka Manavalan <remanava@microsoft.com>
Date: Wed, 17 Nov 2021 02:31:45 +0000
Date: Fri, 18 Feb 2022 22:07:24 +0000
Subject: [PATCH] handle bad password set by sshd

---
Expand All @@ -11,15 +11,15 @@ Subject: [PATCH] handle bad password set by sshd
4 files changed, 49 insertions(+), 4 deletions(-)

diff --git a/pam_tacplus.c b/pam_tacplus.c
index ec8ea27..014421b 100644
index ec8ea27..2421874 100644
--- a/pam_tacplus.c
+++ b/pam_tacplus.c
@@ -251,6 +251,13 @@ int pam_sm_authenticate (pam_handle_t * pamh, int flags,
return PAM_CRED_INSUFFICIENT;
}

+ if (validate_not_sshd_bad_pass(pass) != PAM_SUCCESS) {
+ syslog(LOG_ERR, "auth fail: Password incorrect");
+ syslog(LOG_LOCAL0|LOG_ERR, "auth fail: Password incorrect. user: %s", user);
+ memset(pass, 0, strlen (pass));
+ free(pass);
+ return PAM_AUTH_ERR;
Expand Down