summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2008-07-30 15:06:04 -0700
committerSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 17:28:19 -0800
commit1effe738f84b9f8bfaf8fa40b4f1491b00a5c5bb (patch)
treed807d9a3fb15ff0bc7dfb898640b1e9f7f1c0ce4 /debian
parent3669a35497e86e92b593ce762ae311913c4c4e51 (diff)
remove another patch which is no longer relevant (because we no longer do
capabilities in pam_limits)
Diffstat (limited to 'debian')
-rw-r--r--debian/to-be-evaluated/040_hurd_limits97
1 files changed, 0 insertions, 97 deletions
diff --git a/debian/to-be-evaluated/040_hurd_limits b/debian/to-be-evaluated/040_hurd_limits
deleted file mode 100644
index e601992d..00000000
--- a/debian/to-be-evaluated/040_hurd_limits
+++ /dev/null
@@ -1,97 +0,0 @@
-
-diff -urN Linux-PAM-0.72/modules/pam_limits/Makefile Linux-PAM-0.72.new/modules/pam_limits/Makefile
---- Linux-PAM-0.72/modules/pam_limits/Makefile Wed Jul 4 20:58:43 2001
-+++ Linux-PAM-0.72.new/modules/pam_limits/Makefile Wed Jul 4 19:31:37 2001
-@@ -6,7 +6,7 @@
- # Created by Cristian Gafton <gafton@redhat.com> 1996/09/10
- #
-
--ifeq ($(OS),linux)
-+ifneq (,$(findstring $(OS),gnu linux))
- TITLE=pam_limits
- CONFD=$(CONFIGED)/security
- export CONFD
-@@ -22,7 +22,10 @@
- LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
- LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-+ifeq (linux,$(OS))
- LINKLIBS+=-lcap
-+CFLAGS+=-DUSE_CAPABILITIES
-+endif
-
- dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-diff -urN Linux-PAM-0.72/modules/pam_limits/pam_limits.c Linux-PAM-0.72.new/modules/pam_limits/pam_limits.c
---- Linux-PAM-0.72/modules/pam_limits/pam_limits.c Wed Jul 4 20:58:48 2001
-+++ Linux-PAM-0.72.new/modules/pam_limits/pam_limits.c Wed Jul 4 19:31:31 2001
-@@ -13,12 +13,10 @@
- * See end for Copyright information
- */
-
--#if !(defined(linux))
--#error THIS CODE IS KNOWN TO WORK ONLY ON LINUX !!!
--#endif
--
-+#ifdef USE_CAPABILITIES
- #include <sys/capability.h>
- #include <sys/prctl.h>
-+#endif
-
- #include <stdio.h>
- #include <unistd.h>
-@@ -62,9 +60,11 @@
- specific user or to count all logins */
- static int priority; /* the priority to run user process with */
- static char chroot_dir[8092] = ""; /* directory to chroot into */
-+#ifdef USE_CAPABILITIES
- static cap_t capabilities; /* capability handle */
- static int caps_set = 0; /* capabilities set */
- static int caps_allocated = 0; /* capabilities allocated */
-+#endif
-
- #define LIMIT_LOGIN RLIM_NLIMITS+1
- #define LIMIT_NUMSYSLOGINS RLIM_NLIMITS+2
-@@ -261,11 +261,13 @@
- priority = 0;
- login_limit = -2;
- login_limit_def = LIMITS_DEF_NONE;
-+#ifdef USE_CAPABILITIES
- if (caps_allocated)
- cap_free(capabilities);
- capabilities = cap_init();
- caps_allocated = 1;
- caps_set = 0;
-+#endif
- return retval;
- }
-
-@@ -401,9 +403,13 @@
- } else if (limit_item == LIMIT_CHROOT) {
- strncpy(chroot_dir, value_orig, sizeof(chroot_dir));
- } else if (limit_item == LIMIT_CAPS) {
-+#ifdef USE_CAPABILITIES
- capabilities = cap_from_text(value_orig);
- prctl(PR_SET_KEEPCAPS, 1);
- caps_set = 1;
-+#else
-+ _pam_log(LOG_WARNING, "capabilities not supported on this system, ignoring them");
-+#endif
- }
- return;
- }
-@@ -533,12 +539,14 @@
- if (i != 0)
- retval = LIMIT_ERR;
- }
-+#ifdef USE_CAPABILITIES
- if (!retval && caps_set) {
- retval = cap_set_proc(capabilities) ? LIMIT_ERR : 0;
- cap_free(capabilities);
- caps_set = 0;
- caps_allocated = 0;
- }
-+#endif
- return retval;
- }
- \ No newline at end of file