summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-11-29 16:01:08 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:46:49 +0100
commitcef98aaf276ba16def3fd2cd4a7e432dd1a1cb4c (patch)
treea722ed14be9bd785f910eee23738e2ecf22b526e /source4
parent035e0853e299b63dfe3e5ccc9716fa2466ab306e (diff)
downloadsamba-cef98aaf276ba16def3fd2cd4a7e432dd1a1cb4c.tar.gz
samba-cef98aaf276ba16def3fd2cd4a7e432dd1a1cb4c.tar.bz2
samba-cef98aaf276ba16def3fd2cd4a7e432dd1a1cb4c.zip
r26203: Avoid using ldb_wrap for secrets database.
(This used to be commit b45093f01fc71714e14422a80a81cf1cc25df3e2)
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/gensec/config.mk1
-rw-r--r--source4/param/config.mk2
-rw-r--r--source4/param/secrets.c12
3 files changed, 11 insertions, 4 deletions
diff --git a/source4/auth/gensec/config.mk b/source4/auth/gensec/config.mk
index 17954bbe50..8ee942c63a 100644
--- a/source4/auth/gensec/config.mk
+++ b/source4/auth/gensec/config.mk
@@ -72,6 +72,7 @@ OUTPUT_TYPE = INTEGRATED
PRIVATE_PROTO_HEADER = schannel_state.h
OBJ_FILES = \
schannel_state.o
+PRIVATE_DEPENDENCIES = LDB_WRAP
#
# End SUBSYSTEM SCHANNELDB
################################################
diff --git a/source4/param/config.mk b/source4/param/config.mk
index 17a49eeef6..24feec12bd 100644
--- a/source4/param/config.mk
+++ b/source4/param/config.mk
@@ -47,4 +47,4 @@ PRIVATE_DEPENDENCIES = LIBLDB
[SUBSYSTEM::SECRETS]
OBJ_FILES = secrets.o
-PRIVATE_DEPENDENCIES = LDB_WRAP TDB_WRAP UTIL_TDB
+PRIVATE_DEPENDENCIES = LIBLDB TDB_WRAP UTIL_TDB
diff --git a/source4/param/secrets.c b/source4/param/secrets.c
index c749d38bb2..308c5a607b 100644
--- a/source4/param/secrets.c
+++ b/source4/param/secrets.c
@@ -26,7 +26,6 @@
#include "param/param.h"
#include "system/filesys.h"
#include "tdb_wrap.h"
-#include "ldb_wrap.h"
#include "lib/ldb/include/ldb.h"
#include "lib/tdb/include/tdb.h"
#include "lib/util/util_tdb.h"
@@ -118,11 +117,18 @@ struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx)
/* Secrets.ldb *must* always be local. If we call for a
* system_session() we will recurse */
- ldb = ldb_wrap_connect(mem_ctx, global_loadparm, path, NULL, NULL, 0, NULL);
- talloc_free(path);
+ ldb = ldb_init(mem_ctx);
if (!ldb) {
+ talloc_free(path);
+ return NULL;
+ }
+
+ if (ldb_connect(ldb, path, 0, NULL) != 0) {
+ talloc_free(path);
return NULL;
}
+
+ talloc_free(path);
return ldb;
}