summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-12-08 00:06:50 +0100
committerMichael Adam <obnox@samba.org>2011-01-02 12:51:54 +0100
commitf83fa1ec20fd398dbbe5fab0e25f27d9697df91b (patch)
tree2165e70599c4afa74e1794b636ee12ca6d48fe3d /source3/winbindd
parent632e232fc482cd76553b88b84cd4479bfee0845a (diff)
downloadsamba-f83fa1ec20fd398dbbe5fab0e25f27d9697df91b.tar.gz
samba-f83fa1ec20fd398dbbe5fab0e25f27d9697df91b.tar.bz2
samba-f83fa1ec20fd398dbbe5fab0e25f27d9697df91b.zip
s3:idmap_ldap: remove unused idmap_ldap_alloc_init().
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/idmap_ldap.c82
1 files changed, 0 insertions, 82 deletions
diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index cb5f67d913..b6674ee02b 100644
--- a/source3/winbindd/idmap_ldap.c
+++ b/source3/winbindd/idmap_ldap.c
@@ -251,88 +251,6 @@ static int idmap_ldap_alloc_close_destructor(struct idmap_ldap_alloc_context *ct
return 0;
}
-static NTSTATUS idmap_ldap_alloc_init(struct idmap_domain *dom,
- const char *params)
-{
- NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
- const char *tmp;
- struct idmap_ldap_context *ctx;
-
- /* Only do init if we are online */
- if (idmap_is_offline()) {
- return NT_STATUS_FILE_IS_OFFLINE;
- }
-
- ctx = talloc_get_type(dom->private_data, struct idmap_ldap_context);
-
- ctx->alloc = talloc_zero(ctx, struct idmap_ldap_alloc_context);
- CHECK_ALLOC_DONE(ctx->alloc);
-
- if (params && *params) {
- /* assume location is the only parameter */
- ctx->alloc->url = talloc_strdup(ctx->alloc, params);
- } else {
- tmp = lp_parm_const_string(-1, "idmap alloc config",
- "ldap_url", NULL);
-
- if ( ! tmp) {
- DEBUG(1, ("ERROR: missing idmap ldap url\n"));
- ret = NT_STATUS_UNSUCCESSFUL;
- goto done;
- }
-
- ctx->alloc->url = talloc_strdup(ctx->alloc, tmp);
- }
- CHECK_ALLOC_DONE(ctx->alloc->url);
-
- trim_char(ctx->alloc->url, '\"', '\"');
-
- tmp = lp_parm_const_string(-1, "idmap alloc config",
- "ldap_base_dn", NULL);
- if ( ! tmp || ! *tmp) {
- tmp = lp_ldap_idmap_suffix();
- if ( ! tmp) {
- DEBUG(1, ("ERROR: missing idmap ldap suffix\n"));
- ret = NT_STATUS_UNSUCCESSFUL;
- goto done;
- }
- }
-
- ctx->alloc->suffix = talloc_strdup(ctx->alloc, tmp);
- CHECK_ALLOC_DONE(ctx->alloc->suffix);
-
- ret = smbldap_init(ctx->alloc, winbind_event_context(),
- ctx->alloc->url,
- &ctx->alloc->smbldap_state);
- if (!NT_STATUS_IS_OK(ret)) {
- DEBUG(1, ("ERROR: smbldap_init (%s) failed!\n",
- ctx->alloc->url));
- goto done;
- }
-
- talloc_set_destructor(ctx->alloc, idmap_ldap_alloc_close_destructor);
-
- ret = get_credentials(ctx->alloc,
- ctx->alloc->smbldap_state,
- "idmap alloc config", NULL,
- &ctx->alloc->user_dn);
- if ( !NT_STATUS_IS_OK(ret) ) {
- DEBUG(1,("idmap_ldap_alloc_init: Failed to get connection "
- "credentials (%s)\n", nt_errstr(ret)));
- goto done;
- }
-
- /* see if the idmap suffix and sub entries exists */
-
- ret = verify_idpool(dom);
-
- done:
- if ( !NT_STATUS_IS_OK( ret ) )
- TALLOC_FREE(ctx->alloc);
-
- return ret;
-}
-
/********************************
Allocate a new uid or gid
********************************/