[openssh-commits] [openssh] branch master updated: Debug log for why an account is considered locked.

git+noreply at mindrot.org git+noreply at mindrot.org
Sun May 11 22:56:58 AEST 2025


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

The following commit(s) were added to refs/heads/master by this push:
     new c404686c1 Debug log for why an account is considered locked.
c404686c1 is described below

commit c404686c17daeda7e95ca6fc14c8a4a570cf975d
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Sun May 11 22:54:13 2025 +1000

    Debug log for why an account is considered locked.
---
 platform.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/platform.c b/platform.c
index 4c4fe57ea..fd1a7a7c2 100644
--- a/platform.c
+++ b/platform.c
@@ -183,17 +183,26 @@ platform_locked_account(struct passwd *pw)
 	/* check for locked account */
 	if (passwd && *passwd) {
 #ifdef LOCKED_PASSWD_STRING
-		if (strcmp(passwd, LOCKED_PASSWD_STRING) == 0)
+		if (strcmp(passwd, LOCKED_PASSWD_STRING) == 0) {
+			debug3_f("password matches locked string '%s'",
+			    LOCKED_PASSWD_STRING);
 			locked = 1;
+		}
 #endif
 #ifdef LOCKED_PASSWD_PREFIX
 		if (strncmp(passwd, LOCKED_PASSWD_PREFIX,
-		    strlen(LOCKED_PASSWD_PREFIX)) == 0)
+		    strlen(LOCKED_PASSWD_PREFIX)) == 0) {
+			debug3_f("password matches locked prefix '%s'",
+			    LOCKED_PASSWD_PREFIX);
 			locked = 1;
+		}
 #endif
 #ifdef LOCKED_PASSWD_SUBSTR
-		if (strstr(passwd, LOCKED_PASSWD_SUBSTR))
+		if (strstr(passwd, LOCKED_PASSWD_SUBSTR)) {
+			debug3_f("password matches locked substring '%s'",
+			   LOCKED_PASSWD_SUBSTR);
 			locked = 1;
+		}
 #endif
 	}
 #ifdef USE_LIBIAF

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list