diff --git a/pam.changes b/pam.changes index e85a3ca..11eb66d 100644 --- a/pam.changes +++ b/pam.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 10 08:22:02 UTC 2024 - Thorsten Kukuk + +- pam_limits-systemd.patch: update to final PR + ------------------------------------------------------------------- Fri Sep 6 08:13:22 UTC 2024 - Thorsten Kukuk diff --git a/pam_limits-systemd.patch b/pam_limits-systemd.patch index 2d8a8a2..3934ba9 100644 --- a/pam_limits-systemd.patch +++ b/pam_limits-systemd.patch @@ -1,4 +1,4 @@ -From 62368315c0479657742f34074822b1f9b8608c65 Mon Sep 17 00:00:00 2001 +From 12bb33b56dee6d6b05200d4b776c7e6de3d0df91 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Fri, 6 Sep 2024 11:55:46 +0200 Subject: [PATCH] pam_limits: use systemd-logind instead of utmp (#822) @@ -9,8 +9,8 @@ time for which reason. And it has a Y2038 problem with glibc/x86-64. Query systemd-logind for the number of user sessions instead. --- modules/pam_limits/Makefile.am | 4 +- - modules/pam_limits/pam_limits.c | 80 +++++++++++++++++++++++++++++++-- - 2 files changed, 79 insertions(+), 5 deletions(-) + modules/pam_limits/pam_limits.c | 81 +++++++++++++++++++++++++++++++-- + 2 files changed, 80 insertions(+), 5 deletions(-) diff --git a/modules/pam_limits/Makefile.am b/modules/pam_limits/Makefile.am index ab3cf33ed..3f64d79bb 100644 @@ -35,7 +35,7 @@ index ab3cf33ed..3f64d79bb 100644 dist_secureconf_DATA = limits.conf diff --git a/modules/pam_limits/pam_limits.c b/modules/pam_limits/pam_limits.c -index 75c584fca..4b4a45f18 100644 +index 75c584fca..1e4dfa3d0 100644 --- a/modules/pam_limits/pam_limits.c +++ b/modules/pam_limits/pam_limits.c @@ -36,7 +36,12 @@ @@ -68,7 +68,7 @@ index 75c584fca..4b4a45f18 100644 /* Because there is no definition about when an application actually adds a utmp entry, some applications bizarrely do the utmp call before the have PAM authenticate them to the system: -@@ -273,6 +275,77 @@ check_logins (pam_handle_t *pamh, const char *name, int limit, int ctrl, +@@ -273,6 +275,78 @@ check_logins (pam_handle_t *pamh, const char *name, int limit, int ctrl, count = 1; } @@ -106,6 +106,7 @@ index 75c584fca..4b4a45f18 100644 + free (class); + continue; + } ++ free (class); + + if (sd_session_get_username(sessions_list[i], &user) < 0 || user == NULL) { + pam_syslog(pamh, LOG_ERR, "logind error getting username: %s", @@ -146,7 +147,7 @@ index 75c584fca..4b4a45f18 100644 while((ut = getutent())) { #ifdef USER_PROCESS if (ut->ut_type != USER_PROCESS) { -@@ -311,6 +384,7 @@ check_logins (pam_handle_t *pamh, const char *name, int limit, int ctrl, +@@ -311,6 +385,7 @@ check_logins (pam_handle_t *pamh, const char *name, int limit, int ctrl, } } endutent();