]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Additional tools may use malloc/calloc/free
authorAmos Jeffries <amosjeffries@squid-cache.org>
Tue, 14 Sep 2010 03:19:52 +0000 (21:19 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Tue, 14 Sep 2010 03:19:52 +0000 (21:19 -0600)
25 files changed:
compat/GnuRegex.c
compat/os/dragonfly.h
compat/os/freebsd.h
compat/os/netbsd.h
compat/os/openbsd.h
compat/unsafe.h
helpers/basic_auth/LDAP/basic_ldap_auth.cc
helpers/basic_auth/MSNT/smblib.c
helpers/basic_auth/MSNT/std-includes.h
helpers/basic_auth/MSNT/usersfile.c
helpers/basic_auth/PAM/basic_pam_auth.cc
helpers/basic_auth/SMB/basic_smb_auth.cc
helpers/digest_auth/LDAP/ldap_backend.cc
helpers/digest_auth/eDirectory/edir_ldapext.cc
helpers/digest_auth/eDirectory/ldap_backend.cc
helpers/digest_auth/file/text_backend.cc
helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc
helpers/external_acl/file_userip/ext_file_userip_acl.cc
helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.cc
lib/Profiler.c
lib/util.c
libntlmauth/rfcnb-session.c
libntlmauth/rfcnb-util.c
libntlmauth/smblib-util.c
libntlmauth/smblib.c

index e55d98b9570c792702d37c1bdbebee7684014e5e..86cdc2962fa4f5beb32ff8691ae54d445e413bff 100644 (file)
@@ -32,7 +32,6 @@
 #define _GNU_SOURCE 1
 #endif
 
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 
 #if USE_GNUREGEX /* only if squid needs it. Usually not */
index 5c767fc55429add45dabcd59afe3c6e3a4229cc1..a9071c0ee2795718fe75bd47c74f536f620982af 100644 (file)
 #undef HAVE_MALLOC_H
 #endif
 
-/* Exclude CPPUnit tests from the allocator restrictions. */
-/* BSD implementation uses these still */
-#if defined(SQUID_UNIT_TEST)
-#define SQUID_NO_ALLOC_PROTECT 1
-#endif
-
 #endif /* _SQUID_DRAGONFLY_ */
 #endif /* SQUID_OS_DRAGONFLY_H */
index 43db27dc19b76d9454498743d049cfd29b62a4de..f63b6b3d7c750837e3edbb3c22c36c94bde34a2b 100644 (file)
 
 #define _etext etext
 
-/* Exclude CPPUnit tests from the allocator restrictions. */
-/* BSD implementation uses these still */
-#if defined(SQUID_UNIT_TEST)
-#define SQUID_NO_ALLOC_PROTECT 1
-#endif
-
 /*
  *   This OS has at least one version that defines these as private
  *   kernel macros commented as being 'non-standard'.
index 0b9045282e2745b2ec65470a6171e8a4e2967b24..e47f158f6b2a17b358ee5228249ba07be9e3ae2e 100644 (file)
  *--------------------------------------------------------------------------*
  ****************************************************************************/
 
-/* Exclude CPPUnit tests from the allocator restrictions. */
-/* BSD implementation uses these still */
-#if defined(SQUID_UNIT_TEST)
-#define SQUID_NO_ALLOC_PROTECT 1
-#endif
-
 /* NetBSD does not provide sys_errlist global for strerror */
 #define NEED_SYS_ERRLIST 1
 
index 4e51a279b61ad77ee488ecd5c89a147dfca2c4af..ed336b802b6d2bf91489f4af198b5adf30bbd83b 100644 (file)
 #undef HAVE_MALLOC_H
 #endif
 
-/* Exclude CPPUnit tests from the allocator restrictions. */
-/* BSD implementation uses these still */
-#if defined(SQUID_UNIT_TEST)
-#define SQUID_NO_ALLOC_PROTECT 1
-#endif
-
 /*
  *   This OS has at least one version that defines these as private
  *   kernel macros commented as being 'non-standard'.
index 88af1fed17c0c4d552bdde10baf1de412e43afe7..284607212dc97ba6155bf1583e6b657d19eaf84b 100644 (file)
@@ -9,18 +9,6 @@
  * Trap unintentional use of functions unsafe for use within squid.
  */
 
-#if !SQUID_NO_ALLOC_PROTECT
-#ifndef free
-#define free(x) ERROR_free_UNSAFE_IN_SQUID(x)
-#endif
-#ifndef malloc
-#define malloc ERROR_malloc_UNSAFE_IN_SQUID
-#endif
-#ifndef calloc
-#define calloc ERROR_calloc_UNSAFE_IN_SQUID
-#endif
-#endif /* !SQUID_NO_ALLOC_PROTECT */
-
 #if !SQUID_NO_STRING_BUFFER_PROTECT
 #ifndef sprintf
 #define sprintf ERROR_sprintf_UNSAFE_IN_SQUID
index 061aee8e3de19e67c47ebacfbf3a0e9fd246bf32..68e8cc5423b41654f23544595a0c6374eb8330fe 100644 (file)
@@ -82,7 +82,6 @@
  *             - Allow full filter specifications in -f
  */
 
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 
 #define LDAP_DEPRECATED 1
index 518a924a65ad97e6c4bfff8c571fa6e15c96103d..3c5c18a2ae0e55cf4fd860e09fb9563dda705d2d 100644 (file)
@@ -22,7 +22,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-#define SQUID_NO_ALLOC_PROTECT 1
 
 #include "util.h"
 #include "smblib-priv.h"
index 619b45854be5e559eccc6ea3ccb279c249f171b6..3336dc820a8e7f0d000df54be09650a1527fb9e3 100644 (file)
@@ -24,7 +24,6 @@
  */
 
 /* the types are provided by squid's configure preocess */
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 
 #define BOOL int16_t
index 7cbdcabd8fa66602dc7361206b4942be315844b9..282c5cb871817c686401571139c149a9c0c36c1c 100644 (file)
@@ -8,7 +8,6 @@
  * The code originated from denyusers.c.
  */
 
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 #include "util.h"
 
index 5b52cdfdab82390e4e8a4c937ddfe6862a8a4e7e..9130d03e733e9a12333300494712b952ac3d2faf 100644 (file)
@@ -65,7 +65,6 @@
  *
  * Compile this program with: gcc -o basic_pam_auth basic_pam_auth.cc -lpam -ldl
  */
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 #include "helpers/defines.h"
 #include "rfc1738.h"
index d7a93a59446a3a94b1f5ad01a8c6c896b2a3d57d..1f84f7f386dec51b1398ebc2380427d2128d7b78 100644 (file)
@@ -40,7 +40,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  */
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 #include "helpers/defines.h"
 #include "rfc1738.h"
index 25abcb16ea411684372f96f71c74d6fbec9666bb..74fca3263a639ac44ebae39405534a93f991c22a 100644 (file)
@@ -5,7 +5,6 @@
  * ldap_backend.c
  * AUTHOR: Flavio Pescuma, MARA Systems AB <flavio@marasystems.com>
  */
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 #include "util.h"
 
index 7e26850d1ef7b9b517e754c2de8b051b08aadeca..d688fbcf58500c58ee3f0427a1f4da0b10fc5fca 100644 (file)
@@ -22,7 +22,6 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
 */
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 
 #include "digest_common.h"
index 6d69aa9af03a463c25439690f43eaa8353bdeafc..109928dca0511336b3b7c2b308f45b8a24bddbaf 100644 (file)
@@ -5,7 +5,6 @@
  * ldap_backend.c
  * AUTHOR: Flavio Pescuma, MARA Systems AB <flavio@marasystems.com>
  */
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 
 #define LDAP_DEPRECATED 1
index 95f7326bc139877adf3d75ec7746c2f1e20fdc15..a5b46ec3fe6b9a07fb130b86155be8e0a663a733 100644 (file)
@@ -28,7 +28,6 @@
  *
  * Copyright (c) 2003  Robert Collins  <robertc@squid-cache.org>
  */
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 
 #include "text_backend.h"
index 14363144680aa407ab9ea5f9e52133b84084d330..f8b2ea14b5802ea0ca944a4a9f2c7b476dd407cf 100644 (file)
@@ -34,7 +34,6 @@
  * as published by the Free Software Foundation; either version 2,
  * or (at your option) any later version.
  */
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 #include "helpers/defines.h"
 #include "rfc1738.h"
index 8bee48c50364172ccd329a8f048030b7d6d96292..656cb5d537f25e2d2e866757821cff8d746b9c63 100644 (file)
@@ -18,7 +18,6 @@
 * Author: Rodrigo Campos (rodrigo@geekbunker.org)
 *
 */
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 #include "helpers/defines.h"
 #include "rfc1738.h"
@@ -65,7 +64,7 @@ int dict_lookup(struct ip_user_dict *, char *, char *);
 /** This function parses the dictionary file and loads it
  * in memory. All IP addresses are processed with a bitwise AND
  * with their netmasks before they are stored.
- * If there´s no netmask (no /) in the in the lhs , a mask
+ * If there?s no netmask (no /) in the in the lhs , a mask
  * 255.255.255.255 is assumed.
  * It returns a pointer to the first entry of the linked list
  */
@@ -149,7 +148,7 @@ dict_lookup(struct ip_user_dict *first_entry, char *username,
 
         if ((inet_addr (address) & (unsigned long) current_entry->
                 netmask) == current_entry->address) {
-            /* If the username contains an @ we assume it´s a group and
+            /* If the username contains an @ we assume it?s a group and
                call the corresponding function */
             if ((strchr (current_entry->username, '@')) == NULL) {
                 if ((match_user (current_entry->username, username)) == 1)
index bef750d266b16d1ef7b1a36cc20d292b9e20f14d..2d32af3088ff8e639085072d1f1b16912c8be1ad 100644 (file)
@@ -13,7 +13,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  *
  */
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 #include "compat/debug.h"
 #include "libntlmauth/ntlmauth.h"
index d85070e4e66ff4d599a2bbf4ec5d6fb04a575997..32b82ad7ad5586e372ee4699d14844f850d11463 100644 (file)
  *
  */
 
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 
 /* This include needs to be BELOW config, as it may undef USE_XPROF_STATS */
index 0e75acec502acfa444b5bf43bc0d4ff2f2636527..0e017f5ae95f5e5af29a33a15a0e0355d19e948e 100644 (file)
@@ -34,9 +34,6 @@
 
 #define _etext etext
 
-/* NP: this file is where the memory allocators are defined. */
-#define SQUID_NO_ALLOC_PROTECT 1
-
 #include "config.h"
 #include "profiling.h"
 
index ba352c8b6bdece8d8640a9764e0bcb535f990c7a..38e569c4fefbddf226bd9c4966fef2ee1eed9dc5 100644 (file)
@@ -22,7 +22,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 #include "libntlmauth/rfcnb-priv.h"
 
index 7eeb4a816d0b4f1323d3a37006795d874394e494..5af572c917bd90e9db45ada4f89d244472aed9e6 100644 (file)
@@ -22,7 +22,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 #include "libntlmauth/rfcnb-priv.h"
 
index ef7822d5255a5a9926b57c5cb3db32ef07118f44..deaaf1d36b55f88cd82b72e0300c8a1713bd629e 100644 (file)
@@ -22,7 +22,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 #include "libntlmauth/rfcnb.h"
 #include "libntlmauth/smblib-priv.h"
index d196a5fbb63963c9eac1aabb26804d8d354ea3fe..4a6da58036e240143521f0d8c92425ad28caf656 100644 (file)
@@ -23,7 +23,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-#define SQUID_NO_ALLOC_PROTECT 1
 #include "config.h"
 
 #include "libntlmauth/rfcnb.h"