summaryrefslogtreecommitdiffstats
path: root/debian/patches-applied/032_pam_limits_EPERM_NOT_FATAL
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 12:01:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 12:01:37 +0000
commitdcd7a5748ef6820e3e0d386139d9dd946f0d71fa (patch)
tree66900ada5e764c3422a91836695cdef113bbb883 /debian/patches-applied/032_pam_limits_EPERM_NOT_FATAL
parentAdding upstream version 1.4.0. (diff)
downloadpam-c6c5851461ccc905a70761e687dc6f271bf2069a.tar.xz
pam-c6c5851461ccc905a70761e687dc6f271bf2069a.zip
Adding debian version 1.4.0-9+deb11u1.debian/1.4.0-9+deb11u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-applied/032_pam_limits_EPERM_NOT_FATAL')
-rw-r--r--debian/patches-applied/032_pam_limits_EPERM_NOT_FATAL22
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/patches-applied/032_pam_limits_EPERM_NOT_FATAL b/debian/patches-applied/032_pam_limits_EPERM_NOT_FATAL
new file mode 100644
index 0000000..d5ce695
--- /dev/null
+++ b/debian/patches-applied/032_pam_limits_EPERM_NOT_FATAL
@@ -0,0 +1,22 @@
+setrlimit will sometimes return EPERM for example if you try to increase the
+number of open files too much. This is not something we want to consider
+fatal. This also happens if you use non-root and try to decrease a limit.
+Running PAM as non-root is not so great.
+
+Authors: ?
+
+Upstream status: submitted in <20070830171918.GB30563@dario.dodds.net>
+
+Index: pam/modules/pam_limits/pam_limits.c
+===================================================================
+--- pam.orig/modules/pam_limits/pam_limits.c
++++ pam/modules/pam_limits/pam_limits.c
+@@ -1046,6 +1046,8 @@
+ if (res != 0)
+ pam_syslog(pamh, LOG_ERR, "Could not set limit for '%s': %m",
+ rlimit2str(i));
++ if (res == -1 && errno == EPERM)
++ continue;
+ status |= res;
+ }
+