Remove special socket_wrapper code.
authorAndreas Schneider <asn@samba.org>
Mon, 7 Apr 2014 14:09:00 +0000 (16:09 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 17 Apr 2014 12:56:06 +0000 (14:56 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/replace/getifaddrs.c
lib/replace/system/network.h
lib/replace/wscript
nsswitch/winbind_nss_config.h
nsswitch/wscript_build
source3/libads/ldap.c

index f07d7005e4bf64bfd8eaf2a789f95099d2b5ff87..c2d20f80b89c9b807ac95d7a0acdee6a5571406e 100644 (file)
@@ -23,8 +23,6 @@
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
-#define SOCKET_WRAPPER_NOT_REPLACE
-
 #include "replace.h"
 #include "system/network.h"
 
index 5159fc8c38e245ae8752f0808317837ea7620d85..273cb716cf4b339be5fd0d7932389b3f855e582c 100644 (file)
@@ -367,13 +367,4 @@ struct addrinfo {
 #endif /* HAVE_LINUX_IPV6_V6ONLY_26 */
 #endif /* HAVE_IPV6 */
 
-#ifdef SOCKET_WRAPPER
-#ifndef SOCKET_WRAPPER_DISABLE
-#ifndef SOCKET_WRAPPER_NOT_REPLACE
-#define SOCKET_WRAPPER_REPLACE
-#endif /* SOCKET_WRAPPER_NOT_REPLACE */
-#include "../socket_wrapper/socket_wrapper.h"
-#endif /* SOCKET_WRAPPER_DISABLE */
-#endif /* SOCKET_WRAPPER */
-
 #endif
index 680eb4ca1fb99bf372b7dd866c55d456976649f4..fd5b386e4e37c2dea39bc05ddca97a1005df7021 100644 (file)
@@ -561,7 +561,6 @@ removeea setea
                            #define %s 1
                            #define NO_CONFIG_H 1
                            #define AUTOCONF_TEST 1
-                           #define SOCKET_WRAPPER_NOT_REPLACE
                            #include "replace.c"
                            #include "inet_ntop.c"
                            #include "snprintf.c"
@@ -617,7 +616,7 @@ def build(bld):
         REPLACE_HOSTCC_SOURCE,
         use_hostcc=True,
         use_global_deps=False,
-        cflags='-DSOCKET_WRAPPER_DISABLE=1 -D_SAMBA_HOSTCC_',
+        cflags='-D_SAMBA_HOSTCC_',
         group='compiler_libraries',
         deps = extra_libs
     )
index facde349dac408f1f52b6c9a315f877921d6f1ce..fb3299d58a48b66f7eba75ad64a6928e2bf8ee94 100644 (file)
 #undef SIZEOF_LONG
 #endif
 
-/*
- * we don't need socket wrapper
- * nor nss wrapper here and we don't
- * want to depend on swrap_close()
- * so we better disable both
- */
-#define SOCKET_WRAPPER_NOT_REPLACE
-
 /* Include header files from data in config.h file */
 
 #ifndef NO_CONFIG_H
index 55ba776e5d72801566a4db1e7657d9b752cb8c87..cc17a2ef594dc46715b817cc950ed29bf1cbd781 100644 (file)
@@ -6,7 +6,7 @@ host_os = sys.platform
 bld.SAMBA_LIBRARY('winbind-client',
        source='wb_common.c',
        deps='replace',
-       cflags='-DSOCKET_WRAPPER_DISABLE=1 -DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR,
+       cflags='-DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR,
        private_library=True
        )
 
index c59eda2b499980fb32d3218e1bd75a724e7fa912..d9bb8e2bb1a21c7956bafd2208ea3158d76d8d60 100644 (file)
@@ -71,38 +71,6 @@ static void gotalarm_sig(int signum)
        DEBUG(10, ("Opening connection to LDAP server '%s:%d', timeout "
                   "%u seconds\n", server, port, to));
 
-#if defined(HAVE_LDAP_INIT_FD) && defined(SOCKET_WRAPPER)
-       /* Only use this private LDAP function if we are in make test,
-        * as this is the best way to get the emulated TCP socket into
-        * OpenLDAP */
-       if (socket_wrapper_dir() != NULL) {
-               int fd, ldap_err;
-               NTSTATUS status;
-               char *uri;
-
-               status = open_socket_out(ss, port, to, &fd);
-
-               if (!NT_STATUS_IS_OK(status)) {
-                       return NULL;
-               }
-
-#ifndef LDAP_PROTO_TCP
-#define LDAP_PROTO_TCP 1
-#endif
-               uri = talloc_asprintf(talloc_tos(), "ldap://%s:%u", server, port);
-               if (uri == NULL) {
-                       return NULL;
-               }
-               ldap_err = ldap_init_fd(fd, LDAP_PROTO_TCP, uri, &ldp);
-               talloc_free(uri);
-
-               if (ldap_err != LDAP_SUCCESS) {
-                       return NULL;
-               }
-               return ldp;
-       }
-#endif
-
        if (to) {
                /* Setup timeout */
                gotalarm = 0;