mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
security/samhain: don't use sbrk
Samhain has an internal malloc implementation that uses sbrk and malloc. There's a fallback during initialization if sbrk fails so replace sbrk calls with a function that return the failure value ((void *)-1). PR: 275646 Approved by: freebsd@gregv.net (maintainer)
This commit is contained in:
parent
04af7fb01c
commit
4bfc940087
2 changed files with 22 additions and 1 deletions
|
@ -14,7 +14,7 @@ LICENSE= GPLv2
|
|||
BROKEN_mips= fails to configure: error: Could not find the libwrap library
|
||||
BROKEN_mips64= fails to configure: error: Could not find the libwrap library
|
||||
|
||||
USES= sbrk shebangfix
|
||||
USES= shebangfix
|
||||
SHEBANG_FILES= scripts/samhainadmin-gpg.pl.in \
|
||||
scripts/samhainadmin-sig.pl.in
|
||||
|
||||
|
|
21
security/samhain/files/patch-src_dnmalloc.c
Normal file
21
security/samhain/files/patch-src_dnmalloc.c
Normal file
|
@ -0,0 +1,21 @@
|
|||
--- src/dnmalloc.c.orig
|
||||
+++ src/dnmalloc.c
|
||||
@@ -660,8 +660,18 @@
|
||||
sample version for pre-OSX macos.
|
||||
*/
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+static void *nosbrk(ptrdiff_t len __unused) {
|
||||
+ return MORECORE_FAILURE;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#ifndef MORECORE
|
||||
+#ifdef __FreeBSD__
|
||||
+#define MORECORE nosbrk
|
||||
+#else
|
||||
#define MORECORE sbrk
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue