s4:lib: merge LDB_WRAP and LDBSAMBA and make LDBSAMBA a library.
authorStefan Metzmacher <metze@samba.org>
Wed, 16 Jun 2010 11:43:38 +0000 (13:43 +0200)
committerAndreas Schneider <asn@samba.org>
Wed, 16 Jun 2010 12:07:28 +0000 (14:07 +0200)
This is needed to remove samba specifc symbols from the bundled
ldb, in order to get the ABI right.

metze

Signed-off-by: Andreas Schneider <asn@samba.org>
27 files changed:
source4/dsdb/wscript_build
source4/ldap_server/ldap_backend.c
source4/lib/ldb-samba/ldb_wrap.c [moved from source4/lib/ldb_wrap.c with 98% similarity]
source4/lib/ldb-samba/ldb_wrap.h [moved from source4/lib/ldb_wrap.h with 100% similarity]
source4/lib/ldb-samba/wscript_build
source4/lib/registry/wscript_build
source4/lib/wscript_build
source4/libnet/libnet_become_dc.c
source4/libnet/libnet_unbecome_dc.c
source4/libnet/libnet_vampire.c
source4/libnet/wscript_build
source4/param/provision.c
source4/param/wscript_build
source4/smbd/process_onefork.c
source4/smbd/process_prefork.c
source4/smbd/process_standard.c
source4/smbd/wscript_build
source4/torture/drs/unit/schemainfo_tests.c
source4/torture/libnet/libnet_BecomeDC.c
source4/torture/libnet/utils.c
source4/torture/local/dbspeed.c
source4/torture/rpc/dsgetinfo.c
source4/torture/rpc/dssync.c
source4/torture/rpc/netlogon.c
source4/torture/wscript_build
source4/utils/net/drs/net_drs.c
source4/winbind/idmap.c

index 0a1ea1cc7f446b53a11c565cdd8df4f86f09548b..3b3dae9e661cf0b645add4d94efb6a5267020936 100644 (file)
@@ -6,7 +6,7 @@ bld.SAMBA_SUBSYSTEM('SAMDB',
        source='samdb/samdb.c samdb/samdb_privilege.c samdb/cracknames.c repl/replicated_objects.c',
        autoproto='samdb/samdb_proto.h',
        public_deps='HEIMDAL_KRB5',
-       deps='LIBNDR NDR_DRSUAPI NDR_DRSBLOBS NSS_WRAPPER auth_system_session LIBCLI_AUTH LIBNDR SAMDB_SCHEMA LDB_WRAP SAMDB_COMMON LIBCLI_DRSUAPI LIBCLI_LDAP_NDR LIBSAMBA-UTIL'
+       deps='LIBNDR NDR_DRSUAPI NDR_DRSBLOBS NSS_WRAPPER auth_system_session LIBCLI_AUTH LIBNDR SAMDB_SCHEMA LDBSAMBA SAMDB_COMMON LIBCLI_DRSUAPI LIBCLI_LDAP_NDR LIBSAMBA-UTIL'
        )
 
 
index 7767d053b87bbdc2ef504be4fc01f77eae0083f7..34d59b53cd0c3af8ee61959b33b97b33286c8c80 100644 (file)
@@ -27,7 +27,7 @@
 #include "smbd/service_stream.h"
 #include "dsdb/samdb/samdb.h"
 #include "lib/ldb/include/ldb_errors.h"
-#include "lib/ldb_wrap.h"
+#include "ldb_wrap.h"
 
 #define VALID_DN_SYNTAX(dn) do {\
        if (!(dn)) {\
similarity index 98%
rename from source4/lib/ldb_wrap.c
rename to source4/lib/ldb-samba/ldb_wrap.c
index 8bcfb58f6195f5a9d3e6eb91ff14c13d6fc0017f..d7503829b1a4a12efc247d44e7d182d39ea3cbff 100644 (file)
@@ -123,7 +123,7 @@ static int ldb_wrap_destructor(struct ldb_wrap *w)
 
   TODO:  We need an error_string parameter
  */
-struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
+ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
                                     struct tevent_context *ev,
                                     struct loadparm_context *lp_ctx,
                                     const char *url,
@@ -267,7 +267,7 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
   when we fork() we need to make sure that any open ldb contexts have
   any open transactions cancelled
  */
-void ldb_wrap_fork_hook(void)
+ void ldb_wrap_fork_hook(void)
 {
        struct ldb_wrap *w;
 
index 15f031ba37808026b57f5dd5b6b6edccad2e944c..048cea37f4ce7f3c6ab51593d268157e1f7acf9d 100644 (file)
@@ -1,11 +1,12 @@
 #!/usr/bin/env python
 
 
-bld.SAMBA_SUBSYSTEM('LDBSAMBA',
-       source='ldif_handlers.c',
+bld.SAMBA_LIBRARY('LDBSAMBA',
+       source='ldif_handlers.c ldb_wrap.c',
        autoproto='ldif_handlers_proto.h',
        public_deps='ldb',
-       deps='LIBSECURITY SAMDB_SCHEMA LIBNDR NDR_DRSBLOBS CREDENTIALS'
+       public_headers='ldb_wrap.h',
+       deps='LIBSECURITY SAMDB_SCHEMA LIBNDR NDR_DRSBLOBS CREDENTIALS UTIL_LDB'
        )
 
 
index 185685cdbaa6130c0b710fcaa50c501b59e71a71..de36133f05383a36625f94d515189aff12efc83c 100644 (file)
@@ -13,7 +13,7 @@ bld.SAMBA_SUBSYSTEM('TDR_REGF',
 bld.SAMBA_LIBRARY('registry',
        source='interface.c ../../../libcli/registry/util_reg.c util.c samba.c patchfile_dotreg.c patchfile_preg.c patchfile.c regf.c hive.c local.c ldb.c dir.c rpc.c',
        pc_files='registry.pc',
-       public_deps='LIBSAMBA-UTIL CHARSET TDR_REGF ldb RPC_NDR_WINREG LDB_WRAP',
+       public_deps='LIBSAMBA-UTIL CHARSET TDR_REGF ldb RPC_NDR_WINREG LDBSAMBA',
        public_headers='registry.h',
        vnum='0.0.1'
        )
index 44267629d3fc59be99f6235a62a7e60c3e788b58..49da72cacae324172515b28ad339aa0e0c418a6a 100644 (file)
@@ -13,14 +13,6 @@ bld.SAMBA_SUBSYSTEM('GENCACHE',
        )
 
 
-bld.SAMBA_SUBSYSTEM('LDB_WRAP',
-       source='ldb_wrap.c',
-       public_deps='ldb',
-       public_headers='ldb_wrap.h',
-       deps='LDBSAMBA UTIL_LDB'
-       )
-
-
 bld.SAMBA_SUBSYSTEM('TDB_WRAP',
        source='tdb_wrap.c',
        public_deps='tdb talloc',
index 16ffb5c77d4e40b29c62caa635e11b28bb0afd9d..d64e415f8cc22a30bd688d3b9aed267e8483b6ba 100644 (file)
@@ -23,7 +23,7 @@
 #include "libcli/cldap/cldap.h"
 #include "lib/ldb/include/ldb.h"
 #include "lib/ldb/include/ldb_errors.h"
-#include "lib/ldb_wrap.h"
+#include "ldb_wrap.h"
 #include "dsdb/samdb/samdb.h"
 #include "../libds/common/flags.h"
 #include "librpc/gen_ndr/ndr_drsuapi_c.h"
index 66f73d594fc59a09203be9307807994f40fac18d..a8b53df56d3325fc6e84e06c3dee4f8d349f9361 100644 (file)
@@ -23,7 +23,7 @@
 #include "libcli/cldap/cldap.h"
 #include "lib/ldb/include/ldb.h"
 #include "lib/ldb/include/ldb_errors.h"
-#include "lib/ldb_wrap.h"
+#include "ldb_wrap.h"
 #include "dsdb/samdb/samdb.h"
 #include "../libds/common/flags.h"
 #include "librpc/gen_ndr/ndr_drsuapi_c.h"
index 1d5489cc5adf429a446ab61629a507f68016e1be..9f1f9626bf8df0165e7b4a9af57e10793e691b2a 100644 (file)
@@ -34,7 +34,7 @@
 #include "librpc/gen_ndr/ndr_drsblobs.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "system/time.h"
-#include "lib/ldb_wrap.h"
+#include "ldb_wrap.h"
 #include "auth/auth.h"
 #include "auth/credentials/credentials.h"
 #include "param/param.h"
index 9aa9aed5ae060b85183efc7e908c0e7f91924db8..5bf926b05e97be967426b2b789b4033f9d8c56df 100644 (file)
@@ -3,7 +3,6 @@
 bld.SAMBA_SUBSYSTEM('LIBSAMBA-NET',
        source='libnet.c libnet_passwd.c libnet_time.c libnet_rpc.c libnet_join.c libnet_site.c libnet_become_dc.c libnet_unbecome_dc.c libnet_vampire.c libnet_samdump.c libnet_samdump_keytab.c libnet_samsync_ldb.c libnet_user.c libnet_group.c libnet_share.c libnet_lookup.c libnet_domain.c userinfo.c groupinfo.c userman.c groupman.c prereq_domain.c libnet_samsync.c libnet_export_keytab.c',
        autoproto='libnet_proto.h',
-        deps = 'LDB_WRAP',
        public_deps='CREDENTIALS dcerpc dcerpc_samr RPC_NDR_LSA RPC_NDR_SRVSVC RPC_NDR_DRSUAPI LIBCLI_COMPOSITE LIBCLI_RESOLVE LIBCLI_FINDDCS LIBCLI_CLDAP LIBCLI_FINDDCS gensec_schannel LIBCLI_AUTH LIBNDR SMBPASSWD PROVISION LIBCLI_SAMSYNC HDB_SAMBA4 LIBTSOCKET'
        )
 
index 81c4fb16a50f6a0035b371df4ba0ea35d53ae1fc..0df370b4c276a2502364ea7179452e9f6ed6c3f4 100644 (file)
@@ -21,7 +21,6 @@
 #include <Python.h>
 #include "includes.h"
 #include "auth/auth.h"
-#include "lib/ldb_wrap.h"
 #include "ldb/include/ldb.h"
 #include "ldb_errors.h"
 #include "libcli/raw/libcliraw.h"
index f3729d05506edf980bdf5c3a6ce6b6117f7bacbf..47d82f73ea51bed408613fbbf7fdb5cd19f09699 100644 (file)
@@ -35,7 +35,7 @@ bld.SAMBA_MODULE('share_ldb',
        source='share_ldb.c',
        subsystem='share',
        init_function='share_ldb_init',
-       deps='ldb LDB_WRAP'
+       deps='LDBSAMBA'
        )
 
 
index d1688ec98a5c420af0458f0218b88d99b9ea4b59..b0e2e29bd6cbe1889c4f6ce259662a496e47dd65 100644 (file)
@@ -31,7 +31,7 @@
 #include "system/filesys.h"
 #include "cluster/cluster.h"
 #include "param/param.h"
-#include "lib/ldb_wrap.h"
+#include "ldb_wrap.h"
 
 #ifdef HAVE_SETPROCTITLE
 #ifdef HAVE_SETPROCTITLE_H
index 7813189f19f77590cfa90e602d4c2c068abc9721..fd1dc88fb193c7cf018936478116fab09bf5969d 100644 (file)
@@ -31,7 +31,7 @@
 #include "system/filesys.h"
 #include "cluster/cluster.h"
 #include "param/param.h"
-#include "lib/ldb_wrap.h"
+#include "ldb_wrap.h"
 
 #ifdef HAVE_SETPROCTITLE
 #ifdef HAVE_SETPROCTITLE_H
index baa3136a53fcf83a44b0349864a61e4826b1051d..6a7e8833eb733cf608c86b964551287ff27da808 100644 (file)
@@ -27,7 +27,7 @@
 #include "system/filesys.h"
 #include "cluster/cluster.h"
 #include "param/param.h"
-#include "lib/ldb_wrap.h"
+#include "ldb_wrap.h"
 
 #ifdef HAVE_SETPROCTITLE
 #ifdef HAVE_SETPROCTITLE_H
index 68e75ca1da25e6b6fe9a87d63f3a754479f3f709..217ef951287e972a32ec311f076b6860c808d8e9 100644 (file)
@@ -39,7 +39,7 @@ bld.SAMBA_MODULE('process_model_standard',
        source='process_standard.c',
        subsystem='process_model',
        init_function='process_model_standard_init',
-       deps='LIBEVENTS SETPROCTITLE'
+       deps='LIBEVENTS SETPROCTITLE LDBSAMBA'
        )
 
 
index a69e8a80ccd0b9bf8a1d9020d0693ccfad06f861..3958eb365b6ddbeb899d2c606daac6eab468b8f0 100644 (file)
@@ -24,7 +24,7 @@
 #include "torture/smbtorture.h"
 #include "dsdb/samdb/samdb.h"
 #include "dsdb/samdb/ldb_modules/util.h"
-#include "lib/ldb_wrap.h"
+#include "ldb_wrap.h"
 #include "lib/ldb/include/ldb_module.h"
 #include "torture/rpc/drsuapi.h"
 #include "librpc/ndr/libndr.h"
index 9e0ab1cb4850b9f05c1514e7187cf680051f2d9a..1d095fbf5ff447107306c1ed4d233c1b16fa1791 100644 (file)
@@ -28,7 +28,7 @@
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
 #include "system/time.h"
-#include "lib/ldb_wrap.h"
+#include "ldb_wrap.h"
 #include "auth/auth.h"
 #include "param/param.h"
 #include "param/provision.h"
index dcf284bb98e795421097a868d5a11d9b10f3ddd7..372482d9e893271b2cb3cc5fcc5c756030631289 100644 (file)
@@ -29,7 +29,7 @@
 #include "librpc/gen_ndr/ndr_samr_c.h"
 #include "librpc/gen_ndr/ndr_lsa_c.h"
 #include "torture/libnet/proto.h"
-#include "lib/ldb_wrap.h"
+#include "ldb_wrap.h"
 
 /**
  * Opens handle on Domain using SAMR
index 1541d0ec8482f115c12d6fc23363accc64d730b0..dabf083bff5b3643124165a10d9980b49882f64d 100644 (file)
@@ -24,7 +24,7 @@
 #include "../tdb/include/tdb.h"
 #include "lib/ldb/include/ldb.h"
 #include "lib/ldb/include/ldb_errors.h"
-#include "lib/ldb_wrap.h"
+#include "ldb_wrap.h"
 #include "lib/tdb_wrap.h"
 #include "torture/smbtorture.h"
 #include "param/param.h"
index 7d210229d81c3f105b68e44488d96f553a166dad..8cf3edcdd70c053dd7e1a3156c091838cfac073f 100644 (file)
@@ -29,7 +29,6 @@
 #include "auth/gensec/gensec.h"
 #include "param/param.h"
 #include "dsdb/samdb/samdb.h"
-#include "lib/ldb_wrap.h"
 #include "torture/rpc/torture_rpc.h"
 #include "torture/drs/proto.h"
 
index d6ed1912840a9e292052d835402f2c51b2c4a205..49400bc105c2a4642d12ffa45c7e55c2cf1b53db 100644 (file)
@@ -30,7 +30,6 @@
 #include "auth/gensec/gensec.h"
 #include "param/param.h"
 #include "dsdb/samdb/samdb.h"
-#include "lib/ldb_wrap.h"
 #include "torture/rpc/torture_rpc.h"
 #include "torture/drs/proto.h"
 #include "lib/tsocket/tsocket.h"
index 03de3bdc10375ff56a8a95f0261fb0de82175a69..787914e46d78e56e61d274a1d38c605817f5c94d 100644 (file)
@@ -34,7 +34,7 @@
 #include "libcli/security/security.h"
 #include "lib/ldb/include/ldb.h"
 #include "lib/util/util_ldb.h"
-#include "lib/ldb_wrap.h"
+#include "ldb_wrap.h"
 #include "lib/replace/system/network.h"
 #include "dsdb/samdb/samdb.h"
 
index 4474e2b5f6111c4d4d6befa904fce87d88bace65..798e8c7d723ad1f662e8e789ef0c453757245250 100644 (file)
@@ -102,7 +102,7 @@ bld.SAMBA_MODULE('TORTURE_UNIX',
 bld.SAMBA_MODULE('TORTURE_LDAP',
        source='ldap/common.c ldap/basic.c ldap/schema.c ldap/uptodatevector.c ldap/cldap.c ldap/cldapbench.c ldap/ldap_sort.c ldap/nested_search.c',
        subsystem='smbtorture',
-       deps='LIBCLI_LDAP LIBCLI_CLDAP SAMDB POPT_CREDENTIALS torture LDB_WRAP',
+       deps='LIBCLI_LDAP LIBCLI_CLDAP SAMDB POPT_CREDENTIALS torture LDBSAMBA',
        internal_module=True,
        autoproto='ldap/proto.h',
        init_function='torture_ldap_init'
index c174bf4f9850bfdceb9cc5585ade1f855840fdc8..578b6f2fc30333ab75d88675f769255382eb578e 100644 (file)
@@ -24,7 +24,7 @@
 #include "librpc/gen_ndr/ndr_drsuapi_c.h"
 #include "utils/net/drs/net_drs.h"
 #include "lib/ldb/include/ldb.h"
-#include "lib/ldb_wrap.h"
+#include "ldb_wrap.h"
 #include "system/filesys.h"
 
 
index 9d25a6aaf43ecc45108c4e84cca1a1497b59a093..ede2485e6aba492910cc16c6b1db6430d579261e 100644 (file)
@@ -23,7 +23,7 @@
 #include "auth/auth.h"
 #include "librpc/gen_ndr/ndr_security.h"
 #include "lib/ldb/include/ldb.h"
-#include "lib/ldb_wrap.h"
+#include "ldb_wrap.h"
 #include "param/param.h"
 #include "winbind/idmap.h"
 #include "libcli/security/security.h"