summaryrefslogtreecommitdiff
path: root/debian/patches-applied/040_pam_limits_log_failure
diff options
context:
space:
mode:
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;