summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-06-16 17:21:27 +0200
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:44 +0200
commitbd4cc44c7d99dd2aeabed73ef0659909b78c6830 (patch)
tree0ea16026e9904b239365d523353eb96917d3898d /source3/winbindd
parent871945ae199472f4635a272467a3df5bb4d8c44c (diff)
downloadsamba-bd4cc44c7d99dd2aeabed73ef0659909b78c6830.tar.gz
samba-bd4cc44c7d99dd2aeabed73ef0659909b78c6830.tar.bz2
samba-bd4cc44c7d99dd2aeabed73ef0659909b78c6830.zip
s3:idmap_tdb2: add an idmap_domain struct argument to idmap_tdb2_open_db()
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/idmap_tdb2.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source3/winbindd/idmap_tdb2.c b/source3/winbindd/idmap_tdb2.c
index e6d5bb4290..980992773c 100644
--- a/source3/winbindd/idmap_tdb2.c
+++ b/source3/winbindd/idmap_tdb2.c
@@ -99,7 +99,7 @@ static NTSTATUS idmap_tdb2_load_ranges(void)
/*
open the permanent tdb
*/
-static NTSTATUS idmap_tdb2_open_db(void)
+static NTSTATUS idmap_tdb2_open_db(struct idmap_domain *dom)
{
char *db_path;
@@ -241,7 +241,7 @@ static NTSTATUS idmap_tdb2_allocate_id(struct idmap_domain *dom,
NTSTATUS status;
struct idmap_tdb2_allocate_id_context state;
- status = idmap_tdb2_open_db();
+ status = idmap_tdb2_open_db(dom);
NT_STATUS_NOT_OK_RETURN(status);
/* Get current high water mark */
@@ -349,13 +349,13 @@ static NTSTATUS idmap_tdb2_db_init(struct idmap_domain *dom,
talloc_free(config_option);
}
- ret = idmap_tdb2_open_db();
+ dom->private_data = ctx;
+
+ ret = idmap_tdb2_open_db(dom);
if (!NT_STATUS_IS_OK(ret)) {
goto failed;
}
- dom->private_data = ctx;
-
return NT_STATUS_OK;
failed:
@@ -494,13 +494,13 @@ static NTSTATUS idmap_tdb2_id_to_sid(struct idmap_domain *dom, struct id_map *ma
struct idmap_tdb2_context *ctx;
- status = idmap_tdb2_open_db();
- NT_STATUS_NOT_OK_RETURN(status);
-
if (!dom || !map) {
return NT_STATUS_INVALID_PARAMETER;
}
+ status = idmap_tdb2_open_db(dom);
+ NT_STATUS_NOT_OK_RETURN(status);
+
ctx = talloc_get_type(dom->private_data, struct idmap_tdb2_context);
/* apply filters before checking */
@@ -598,7 +598,7 @@ static NTSTATUS idmap_tdb2_sid_to_id(struct idmap_domain *dom, struct id_map *ma
struct idmap_tdb2_context *ctx;
TALLOC_CTX *tmp_ctx = talloc_stackframe();
- ret = idmap_tdb2_open_db();
+ ret = idmap_tdb2_open_db(dom);
NT_STATUS_NOT_OK_RETURN(ret);
ctx = talloc_get_type(dom->private_data, struct idmap_tdb2_context);