summaryrefslogtreecommitdiff
path: root/source4/param/secrets.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-03 15:53:17 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:28 +0100
commitab69eb8d8901d23794c6a298718e67656ef4820e (patch)
treecd415ecd2aee4caa9e47f6c442d0d23b2f443b9c /source4/param/secrets.c
parent0a2f1a46a02d2c9497d05d7e534829dc6e9430dc (diff)
downloadsamba-ab69eb8d8901d23794c6a298718e67656ef4820e.tar.gz
samba-ab69eb8d8901d23794c6a298718e67656ef4820e.tar.bz2
samba-ab69eb8d8901d23794c6a298718e67656ef4820e.zip
r26250: Avoid global_loadparm in a couple more places.
(This used to be commit 2c6b755309fdf685cd0b0564272bf83038574a43)
Diffstat (limited to 'source4/param/secrets.c')
-rw-r--r--source4/param/secrets.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/param/secrets.c b/source4/param/secrets.c
index eeced9ddbe..5a6df3174a 100644
--- a/source4/param/secrets.c
+++ b/source4/param/secrets.c
@@ -61,7 +61,7 @@ void secrets_shutdown(void)
/**
* open up the secrets database
*/
-bool secrets_init(void)
+bool secrets_init(struct loadparm_context *lp_ctx)
{
char *fname;
uint8_t dummy;
@@ -69,8 +69,7 @@ bool secrets_init(void)
if (tdb != NULL)
return true;
- fname = private_path(NULL, global_loadparm,
- "secrets.tdb");
+ fname = private_path(NULL, lp_ctx, "secrets.tdb");
tdb = tdb_wrap_open(talloc_autofree_context(), fname, 0, TDB_DEFAULT,
O_RDWR|O_CREAT, 0600);
@@ -141,6 +140,7 @@ struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx, struct loadparm_cont
* @return pointer to a SID object if the SID could be obtained, NULL otherwise
*/
struct dom_sid *secrets_get_domain_sid(TALLOC_CTX *mem_ctx,
+ struct loadparm_context *lp_ctx,
const char *domain)
{
struct ldb_context *ldb;
@@ -149,7 +149,7 @@ struct dom_sid *secrets_get_domain_sid(TALLOC_CTX *mem_ctx,
const char *attrs[] = { "objectSid", NULL };
struct dom_sid *result = NULL;
- ldb = secrets_db_connect(mem_ctx, global_loadparm);
+ ldb = secrets_db_connect(mem_ctx, lp_ctx);
if (ldb == NULL) {
DEBUG(5, ("secrets_db_connect failed\n"));
return NULL;