summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-03-03 17:48:43 +0100
committerMichael Adam <obnox@samba.org>2011-03-22 22:49:57 +0100
commitefc1d38b32cc35f51e0a6bf05e1e45b45dbc9abf (patch)
tree1414336b5dc5f19ee43be5f91b71ae4a4b9af64c
parentca8c493bfdc86f222a65d9ce8fc761de89fca9b7 (diff)
downloadsamba-efc1d38b32cc35f51e0a6bf05e1e45b45dbc9abf.tar.gz
samba-efc1d38b32cc35f51e0a6bf05e1e45b45dbc9abf.tar.bz2
samba-efc1d38b32cc35f51e0a6bf05e1e45b45dbc9abf.zip
s3:idmap: simply call idmap_init_named_domain for "*" in idmap_init_default_domain
The default domain "*" is now treated exactly the same as other explicitly configured domains.
-rw-r--r--source3/winbindd/idmap.c55
1 files changed, 14 insertions, 41 deletions
diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c
index 00ba7da505..1c4e25ad33 100644
--- a/source3/winbindd/idmap.c
+++ b/source3/winbindd/idmap.c
@@ -295,47 +295,6 @@ fail:
}
/**
- * Initialize the default domain structure
- * @param[in] mem_ctx memory context for the result
- * @result The default domain structure
- *
- * This routine takes the module name from the "idmap backend" parameter,
- * passing a possible parameter like ldap:ldap://ldap-url/ to the module.
- */
-
-static struct idmap_domain *idmap_init_default_domain(TALLOC_CTX *mem_ctx)
-{
- struct idmap_domain *result;
- char *modulename;
- char *params;
-
- idmap_init();
-
- if (!parse_idmap_module(talloc_tos(), lp_idmap_backend(), &modulename,
- &params)) {
- DEBUG(1, ("parse_idmap_module failed\n"));
- return NULL;
- }
-
- DEBUG(3, ("idmap_init: using '%s' as remote backend\n", modulename));
-
- result = idmap_init_domain(mem_ctx, "*", modulename, true);
- if (result == NULL) {
- goto fail;
- }
-
- TALLOC_FREE(modulename);
- TALLOC_FREE(params);
- return result;
-
-fail:
- TALLOC_FREE(modulename);
- TALLOC_FREE(params);
- TALLOC_FREE(result);
- return NULL;
-}
-
-/**
* Initialize a named domain structure
* @param[in] mem_ctx memory context for the result
* @param[in] domname the domain name
@@ -380,6 +339,20 @@ fail:
}
/**
+ * Initialize the default domain structure
+ * @param[in] mem_ctx memory context for the result
+ * @result The default domain structure
+ *
+ * This routine takes the module name from the "idmap backend" parameter,
+ * passing a possible parameter like ldap:ldap://ldap-url/ to the module.
+ */
+
+static struct idmap_domain *idmap_init_default_domain(TALLOC_CTX *mem_ctx)
+{
+ return idmap_init_named_domain(mem_ctx, "*");
+}
+
+/**
* Initialize the passdb domain structure
* @param[in] mem_ctx memory context for the result
* @result The default domain structure