summaryrefslogtreecommitdiff
path: root/source4/passdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-01-11 14:04:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:42 -0500
commita249198d539685be5cb97e179e85ae00dbba8c83 (patch)
tree1e0ae58592cc6a4d7a09934a1fabca03e53871b6 /source4/passdb
parent7ab7debcf17d833ac15512604f73b551c27534c2 (diff)
downloadsamba-a249198d539685be5cb97e179e85ae00dbba8c83.tar.gz
samba-a249198d539685be5cb97e179e85ae00dbba8c83.tar.bz2
samba-a249198d539685be5cb97e179e85ae00dbba8c83.zip
r4682: A LDB-based secrets implementation in Samba4.
This uses LDB (a local secrets.ldb and the global samdb) to fill out the secrets from an LSA perspective. Some small changes to come, but the bulk of the work is now done. A re-provision is required after this change. Andrew Bartlett (This used to be commit ded33033521a6a1c7ea80758c5c5aeeebb182a51)
Diffstat (limited to 'source4/passdb')
-rw-r--r--source4/passdb/secrets.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source4/passdb/secrets.c b/source4/passdb/secrets.c
index 389db30f8c..7045cf6af7 100644
--- a/source4/passdb/secrets.c
+++ b/source4/passdb/secrets.c
@@ -170,3 +170,25 @@ void secrets_named_mutex_release(const char *name, size_t *p_ref_count)
DEBUG(10,("secrets_named_mutex_release: ref_count for mutex %s = %u\n", name, (uint_t)ref_count ));
}
+/*
+ connect to the schannel ldb
+*/
+struct ldb_wrap *secrets_db_connect(TALLOC_CTX *mem_ctx)
+{
+ char *path;
+ struct ldb_wrap *ldb;
+
+ path = private_path(mem_ctx, "secrets.ldb");
+ if (!path) {
+ return NULL;
+ }
+
+ ldb = ldb_wrap_connect(mem_ctx, path, 0, NULL);
+ talloc_free(path);
+ if (!ldb) {
+ return NULL;
+ }
+
+ return ldb;
+}
+