sys-libs/pam: Locked accounts functionality

This commit is contained in:
Krzesimir Nowak 2020-08-18 21:25:19 +02:00 committed by Kai Lüke
parent e13fd9d00b
commit 77d03afebf
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff -ur linux-pam-d5cb4409ab6b04a6ed7c00245e2c9a430f352b16.orig/modules/pam_unix/support.c linux-pam-d5cb4409ab6b04a6ed7c00245e2c9a430f352b16/modules/pam_unix/support.c
--- linux-pam-d5cb4409ab6b04a6ed7c00245e2c9a430f352b16.orig/modules/pam_unix/support.c 2020-08-18 20:50:27.226355628 +0200
+++ linux-pam-d5cb4409ab6b04a6ed7c00245e2c9a430f352b16/modules/pam_unix/support.c 2020-08-18 20:51:20.456212931 +0200
@@ -847,6 +847,9 @@
return retval;
}
+ if (pwent->pw_passwd != NULL && pwent->pw_passwd[0] == '!')
+ return PAM_PERM_DENIED;
+
if (retval == PAM_SUCCESS && spent == NULL)
return PAM_SUCCESS;

View File

@ -48,6 +48,7 @@ S="${WORKDIR}/${MY_P}"
src_prepare() {
default
touch ChangeLog || die
epatch "${FILESDIR}"/pam-1.5.0-locked-accounts.patch
eautoreconf
}