summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap_tdb.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_tdb.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_tdb.c')
-rw-r--r--source3/winbindd/idmap_tdb.c45
1 files changed, 3 insertions, 42 deletions
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c
index e5f605361b..3f6cccd35a 100644
--- a/source3/winbindd/idmap_tdb.c
+++ b/source3/winbindd/idmap_tdb.c
@@ -585,7 +585,7 @@ struct idmap_tdb_context {
Initialise idmap database.
*****************************/
-static NTSTATUS idmap_tdb_db_init(struct idmap_domain *dom)
+static NTSTATUS idmap_tdb_db_init(struct idmap_domain *dom, const char *params)
{
NTSTATUS ret;
struct idmap_tdb_context *ctx;
@@ -619,7 +619,6 @@ static NTSTATUS idmap_tdb_db_init(struct idmap_domain *dom)
}
dom->private_data = ctx;
- dom->initialized = True;
talloc_free(config_option);
return NT_STATUS_OK;
@@ -774,14 +773,6 @@ static NTSTATUS idmap_tdb_unixids_to_sids(struct idmap_domain *dom, struct id_ma
NTSTATUS ret;
int i;
- /* make sure we initialized */
- if ( ! dom->initialized) {
- ret = idmap_tdb_db_init(dom);
- if ( ! NT_STATUS_IS_OK(ret)) {
- return ret;
- }
- }
-
ctx = talloc_get_type(dom->private_data, struct idmap_tdb_context);
for (i = 0; ids[i]; i++) {
@@ -820,14 +811,6 @@ static NTSTATUS idmap_tdb_sids_to_unixids(struct idmap_domain *dom, struct id_ma
NTSTATUS ret;
int i;
- /* make sure we initialized */
- if ( ! dom->initialized) {
- ret = idmap_tdb_db_init(dom);
- if ( ! NT_STATUS_IS_OK(ret)) {
- return ret;
- }
- }
-
ctx = talloc_get_type(dom->private_data, struct idmap_tdb_context);
for (i = 0; ids[i]; i++) {
@@ -868,14 +851,6 @@ static NTSTATUS idmap_tdb_set_mapping(struct idmap_domain *dom, const struct id_
char *ksidstr, *kidstr;
fstring tmp;
- /* make sure we initialized */
- if ( ! dom->initialized) {
- ret = idmap_tdb_db_init(dom);
- if ( ! NT_STATUS_IS_OK(ret)) {
- return ret;
- }
- }
-
if (!map || !map->sid) {
return NT_STATUS_INVALID_PARAMETER;
}
@@ -983,14 +958,6 @@ static NTSTATUS idmap_tdb_remove_mapping(struct idmap_domain *dom, const struct
char *ksidstr, *kidstr;
fstring tmp;
- /* make sure we initialized */
- if ( ! dom->initialized) {
- ret = idmap_tdb_db_init(dom);
- if ( ! NT_STATUS_IS_OK(ret)) {
- return ret;
- }
- }
-
if (!map || !map->sid) {
return NT_STATUS_INVALID_PARAMETER;
}
@@ -1171,14 +1138,6 @@ static NTSTATUS idmap_tdb_dump_data(struct idmap_domain *dom, struct id_map **ma
struct dump_data *data;
NTSTATUS ret = NT_STATUS_OK;
- /* make sure we initialized */
- if ( ! dom->initialized) {
- ret = idmap_tdb_db_init(dom);
- if ( ! NT_STATUS_IS_OK(ret)) {
- return ret;
- }
- }
-
ctx = talloc_get_type(dom->private_data, struct idmap_tdb_context);
data = TALLOC_ZERO_P(ctx, struct dump_data);
@@ -1229,6 +1188,8 @@ NTSTATUS idmap_tdb_init(void)
{
NTSTATUS ret;
+ DEBUG(10, ("calling idmap_tdb_init\n"));
+
/* FIXME: bad hack to actually register also the alloc_tdb module without changining configure.in */
ret = idmap_alloc_tdb_init();
if (! NT_STATUS_IS_OK(ret)) {