summaryrefslogtreecommitdiff
path: root/debian/patches-applied/040_pam_limits_log_failure
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2009-08-24 13:50:54 -0700
committerSteve Langasek <vorlon@debian.org>2019-01-08 21:25:56 -0800
commitb0f7621ed1b4818eb47e0a91393c3c6cb65b8b3f (patch)
tree791bf9f4a6860777f5517042deca2e4548926495 /debian/patches-applied/040_pam_limits_log_failure
parente8b6e844a89e3303214525ad889e78e7b4e55a35 (diff)
refresh other patches for new upstream release
Diffstat (limited to 'debian/patches-applied/040_pam_limits_log_failure')
-rw-r--r--debian/patches-applied/040_pam_limits_log_failure23
1 files changed, 13 insertions, 10 deletions
diff --git a/debian/patches-applied/040_pam_limits_log_failure b/debian/patches-applied/040_pam_limits_log_failure
index 0daf4f7e..f80273e7 100644
--- a/debian/patches-applied/040_pam_limits_log_failure
+++ b/debian/patches-applied/040_pam_limits_log_failure
@@ -7,27 +7,30 @@ Authors: Sam Hartman <hartmans@debian.org>
Upstream status: submitted in <20070830171918.GB30563@dario.dodds.net>
-Index: debian-pkg-pam/modules/pam_limits/pam_limits.c
+Index: pam.deb/modules/pam_limits/pam_limits.c
===================================================================
---- debian-pkg-pam.orig/modules/pam_limits/pam_limits.c 2009-04-17 12:47:06.000000000 -0700
-+++ debian-pkg-pam/modules/pam_limits/pam_limits.c 2009-04-17 12:47:13.000000000 -0700
-@@ -664,6 +664,19 @@
+--- pam.deb.orig/modules/pam_limits/pam_limits.c
++++ pam.deb/modules/pam_limits/pam_limits.c
+@@ -732,9 +732,19 @@
if (pl->limits[i].limit.rlim_cur > pl->limits[i].limit.rlim_max)
pl->limits[i].limit.rlim_cur = pl->limits[i].limit.rlim_max;
- retval = setrlimit(i, &pl->limits[i].limit);
-+ if (retval != 0 && (i != RLIMIT_NOFILE
+ res = setrlimit(i, &pl->limits[i].limit);
+- if (res != 0)
+- pam_syslog(pamh, LOG_ERR, "Could not set limit for '%s': %m",
+- rlimit2str(i));
++ if (res != 0 && (i != RLIMIT_NOFILE
+ || pl->limits[i].limit.rlim_cur != RLIM_INFINITY))
+ {
+ int save_errno = errno;
+ pam_syslog(pamh, LOG_DEBUG,
-+ "setrlimit limit #%d to soft=%d, hard=%d failed:"
-+ " %m; uid=%lu,euid=%lu", i,
++ "Could not set limit for '%s' to soft=%d, hard=%d:"
++ " %m; uid=%lu,euid=%lu", rlimit2str(i),
+ pl->limits[i].limit.rlim_cur,
+ pl->limits[i].limit.rlim_max,
+ (unsigned long) getuid(),
+ (unsigned long) geteuid());
+ errno = save_errno;
+ }
- if (retval == -1 && errno==EPERM)
+ if (res == -1 && errno == EPERM)
continue;
- status |= retval;
+ status |= res;