diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-08-16 03:24:36 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-08-16 03:24:36 +0000 |
commit | f68398b659c0b307f342dae85060582fea063085 (patch) | |
tree | a69486ca46bcb3d0b460755c200b095f41a60595 /net-misc/ntp/files | |
parent | punt copyright lines (diff) | |
download | gentoo-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/ntp/files')
-rw-r--r-- | net-misc/ntp/files/ntp-4.2.0.20050303-rlimit-memlock.patch | 25 |
1 files changed, 25 insertions, 0 deletions
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 */ + /* |