Taint: invert the taint-check implementation control #define
authorJeremy Harris <jgh146exb@wizmail.org>
Tue, 10 Dec 2019 13:19:09 +0000 (13:19 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Tue, 10 Dec 2019 16:02:48 +0000 (16:02 +0000)
src/OS/Makefile-FreeBSD
src/OS/Makefile-Linux
src/OS/Makefile-OpenBSD
src/OS/Makefile-SunOS5
src/src/mytypes.h
src/src/store.c

index 1a2f8ecab05f103475a4bd881b506a2e11ebeede..8dbdab79d3bb56ca6ecb0f4e1c31b9bf7a619a8a 100644 (file)
@@ -4,7 +4,6 @@ CHOWN_COMMAND=/usr/sbin/chown
 STRIP_COMMAND=/usr/bin/strip
 CHMOD_COMMAND=/bin/chmod
 
-CFLAGS += -DTAINT_CHECK_SLOW
 
 # FreeBSD Ports no longer insert compatibility symlinks into /usr/bin for
 # scripting languages which traditionally have had them.
index ae9f249a9abd896b1ac450524e3d9853cdf1ada5..d1d501376afc48bb45d8462e5faf25f9a8266bb7 100644 (file)
@@ -18,6 +18,9 @@ CC=cc
 CFLAGS ?= -O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 CFLAGS_DYNAMIC ?= -shared -rdynamic
 
+# We have mmap/malloc addr spaces separate
+CFLAGS += -DTAINT_CHECK_FAST
+
 DBMLIB = -ldb
 USE_DB = yes
 
index 8bff1b058874296165fc296eece0273493470f3e..1855e55bde9f826b5d8c03c7dc8d14c631b45d04 100644 (file)
@@ -6,7 +6,6 @@ CHMOD_COMMAND=/bin/chmod
 
 CC=cc
 CFLAGS=-O2 -Wall -Wno-parentheses -Wno-self-assign -Wno-logical-op-parentheses
-CFLAGS += -DTAINT_CHECK_SLOW
 
 LIBS=-lm
 
index fc3fd96cfb6f4bf2fca8c8e162040c6ba978a419..33cb1f0337fcf776265bf800b313ec66be712fd7 100644 (file)
@@ -1,7 +1,5 @@
 # Exim: OS-specific make file for SunOS5
 
-CFLAGS=-O -DTAINT_CHECK_SLOW
-
 HAVE_ICONV=yes
 
 BASENAME_COMMAND=look_for_it
index ceb9f1b5592569ecc48e5ffe484104f37c1b326a..fd33168f717dc692c49b8c0c12135c15c3dba5d0 100644 (file)
@@ -137,7 +137,7 @@ is_tainted(const void * p)
 #if defined(COMPILE_UTILITY) || defined(MACRO_PREDEF)
 return FALSE;
 
-#elif defined(TAINT_CHECK_SLOW)
+#elif !defined(TAINT_CHECK_FAST)
 extern BOOL is_tainted_fn(const void *);
 return is_tainted_fn(p);
 
index fbfd20d1de64d34fb276e183aad8483b91cc872b..a8f5a07fcecfaaacced5c588d0eadc6ec7634fe6 100644 (file)
@@ -180,6 +180,7 @@ static void   internal_tainted_free(storeblock *, const char *, int linenumber);
 
 /******************************************************************************/
 
+#ifndef TAINT_CHECK_FAST
 /* Slower version check, for use when platform intermixes malloc and mmap area
 addresses. */
 
@@ -207,6 +208,7 @@ return FALSE;
 hit:
 return pool >= POOL_TAINT_BASE;
 }
+#endif
 
 
 void