summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-08-16 03:24:36 +0000
committerMike Frysinger <vapier@gentoo.org>2005-08-16 03:24:36 +0000
commitf68398b659c0b307f342dae85060582fea063085 (patch)
treea69486ca46bcb3d0b460755c200b095f41a60595 /net-misc
parentpunt copyright lines (diff)
downloadgentoo-2-f68398b659c0b307f342dae85060582fea063085.tar.gz
gentoo-2-f68398b659c0b307f342dae85060582fea063085.tar.bz2
gentoo-2-f68398b659c0b307f342dae85060582fea063085.zip
Add fix for memlock issues #99713 by Marcin Deranek and Christoph Gysin.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/ntp/ChangeLog6
-rw-r--r--net-misc/ntp/files/ntp-4.2.0.20050303-rlimit-memlock.patch25
-rw-r--r--net-misc/ntp/ntp-4.2.0.20050303.ebuild3
3 files changed, 32 insertions, 2 deletions
diff --git a/net-misc/ntp/ChangeLog b/net-misc/ntp/ChangeLog
index 73a5604b2434..d90f0cda559f 100644
--- a/net-misc/ntp/ChangeLog
+++ b/net-misc/ntp/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-misc/ntp
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ChangeLog,v 1.65 2005/07/20 22:38:40 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ChangeLog,v 1.66 2005/08/16 03:24:36 vapier Exp $
+
+ 16 Aug 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/ntp-4.2.0.20050303-rlimit-memlock.patch, ntp-4.2.0.20050303.ebuild:
+ Add fix for memlock issues #99713 by Marcin Deranek and Christoph Gysin.
20 Jul 2005; Diego Pettenò <flameeyes@gentoo.org> ntp-4.1.2.ebuild,
ntp-4.2.0-r2.ebuild, ntp-4.2.0.20040617.ebuild,
diff --git a/net-misc/ntp/files/ntp-4.2.0.20050303-rlimit-memlock.patch b/net-misc/ntp/files/ntp-4.2.0.20050303-rlimit-memlock.patch
new file mode 100644
index 000000000000..22e676b76db5
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.0.20050303-rlimit-memlock.patch
@@ -0,0 +1,25 @@
+A proper fix has been accepted upstream, this is just a simple workaround.
+
+http://lists.ntp.isc.org/pipermail/hackers/2005-June/001418.html
+http://bugs.gentoo.org/show_bug.cgi?id=99713
+https://ntp.isc.org/bugs/show_bug.cgi?id=477
+
+--- ntpd/ntpd.c
++++ ntpd/ntpd.c
+@@ -691,6 +691,16 @@
+ "Cannot adjust stack limit for mlockall: %m");
+ }
+ }
++ /*
++ * The default RLIMIT_MEMLOCK is very low on Linux systems.
++ * Unless we increase this limit malloc calls are likely to
++ * fail if we drop root privlege. To be useful the value
++ * has to be larger than the largest ntpd resident set size.
++ */
++ rl.rlim_cur = rl.rlim_max = 32*1024*1024;
++ if (setrlimit(RLIMIT_MEMLOCK, &rl) == -1) {
++ msyslog(LOG_ERR, "Cannot set RLIMIT_MEMLOCK: %m");
++ }
+ }
+ # endif /* HAVE_SETRLIMIT */
+ /*
diff --git a/net-misc/ntp/ntp-4.2.0.20050303.ebuild b/net-misc/ntp/ntp-4.2.0.20050303.ebuild
index 3fe1b6310468..be634f917ad4 100644
--- a/net-misc/ntp/ntp-4.2.0.20050303.ebuild
+++ b/net-misc/ntp/ntp-4.2.0.20050303.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.2.0.20050303.ebuild,v 1.3 2005/07/20 22:38:40 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.2.0.20050303.ebuild,v 1.4 2005/08/16 03:24:36 vapier Exp $
inherit eutils
@@ -52,6 +52,7 @@ src_unpack() {
epatch "${FILESDIR}"/4.2.0.20040617-debug-fix.patch
epatch "${FILESDIR}"/4.2.0.20040617-freebsd.patch
epatch "${FILESDIR}"/ntp-4.2.0-gcc4.patch
+ epatch "${FILESDIR}"/ntp-4.2.0.20050303-rlimit-memlock.patch #99713
sed -i \
-e 's:md5\.h:touch_not_my_md5:g' \