1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r26203: Avoid using ldb_wrap for secrets database.

(This used to be commit b45093f01f)
This commit is contained in:
Jelmer Vernooij 2007-11-29 16:01:08 +01:00 committed by Stefan Metzmacher
parent 035e0853e2
commit cef98aaf27
3 changed files with 11 additions and 4 deletions

View File

@ -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
################################################

View File

@ -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

View File

@ -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,12 +117,19 @@ 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;
}