summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap_tdb2.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-07-13 12:07:40 +0200
committerVolker Lendecke <vl@samba.org>2008-08-12 11:28:29 +0200
commit340ab6a256802a22c11b7f707748397249075b65 (patch)
tree20d297829eb3e27c6c80ad537712627ae845a4ef /source3/winbindd/idmap_tdb2.c
parent8d4bd2d960ebf11bc85891210c6f72a371e08417 (diff)
downloadsamba-340ab6a256802a22c11b7f707748397249075b65.tar.gz
samba-340ab6a256802a22c11b7f707748397249075b65.tar.bz2
samba-340ab6a256802a22c11b7f707748397249075b65.zip
idmap rewrite
(This used to be commit 30a180f2fce8cf6a3e5548f6bba453272ba70b33)
Diffstat (limited to 'source3/winbindd/idmap_tdb2.c')
-rw-r--r--source3/winbindd/idmap_tdb2.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/source3/winbindd/idmap_tdb2.c b/source3/winbindd/idmap_tdb2.c
index ab89e615f7..d30b6459fb 100644
--- a/source3/winbindd/idmap_tdb2.c
+++ b/source3/winbindd/idmap_tdb2.c
@@ -431,7 +431,8 @@ static NTSTATUS tdb2_delete_bystring(const char *keystr)
/*
Initialise idmap database.
*/
-static NTSTATUS idmap_tdb2_db_init(struct idmap_domain *dom)
+static NTSTATUS idmap_tdb2_db_init(struct idmap_domain *dom,
+ const char *params)
{
NTSTATUS ret;
struct idmap_tdb2_context *ctx;
@@ -464,7 +465,6 @@ static NTSTATUS idmap_tdb2_db_init(struct idmap_domain *dom)
}
dom->private_data = ctx;
- dom->initialized = True;
talloc_free(config_option);
return NT_STATUS_OK;
@@ -725,14 +725,6 @@ static NTSTATUS idmap_tdb2_unixids_to_sids(struct idmap_domain *dom, struct id_m
NTSTATUS ret;
int i;
- /* make sure we initialized */
- if ( ! dom->initialized) {
- ret = idmap_tdb2_db_init(dom);
- if ( ! NT_STATUS_IS_OK(ret)) {
- return ret;
- }
- }
-
ctx = talloc_get_type(dom->private_data, struct idmap_tdb2_context);
for (i = 0; ids[i]; i++) {
@@ -770,14 +762,6 @@ static NTSTATUS idmap_tdb2_sids_to_unixids(struct idmap_domain *dom, struct id_m
NTSTATUS ret;
int i;
- /* make sure we initialized */
- if ( ! dom->initialized) {
- ret = idmap_tdb2_db_init(dom);
- if ( ! NT_STATUS_IS_OK(ret)) {
- return ret;
- }
- }
-
ctx = talloc_get_type(dom->private_data, struct idmap_tdb2_context);
for (i = 0; ids[i]; i++) {
@@ -819,14 +803,6 @@ static NTSTATUS idmap_tdb2_set_mapping(struct idmap_domain *dom, const struct id
struct db_record *update_lock = NULL;
struct db_record *rec = NULL;
- /* make sure we initialized */
- if ( ! dom->initialized) {
- ret = idmap_tdb2_db_init(dom);
- if ( ! NT_STATUS_IS_OK(ret)) {
- return ret;
- }
- }
-
if (!map || !map->sid) {
return NT_STATUS_INVALID_PARAMETER;
}