summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-11-01 12:11:57 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-11-01 06:32:52 +0100
commitaabda85a2fc9f6763abd56d61ff819012f2225ad (patch)
tree9fc65f83a4a43c6e0d8b27ee54ffb39a74565c63
parent06f4672d23e6eaee294b4f14f0bee7285cc641c8 (diff)
downloadsamba-aabda85a2fc9f6763abd56d61ff819012f2225ad.tar.gz
samba-aabda85a2fc9f6763abd56d61ff819012f2225ad.tar.bz2
samba-aabda85a2fc9f6763abd56d61ff819012f2225ad.zip
s4-dsdb Remove LDAP backend credentials support
The error message from this causes confusion, for a feature that we have never finished and have agreed to remove. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Nov 1 06:32:52 CET 2011 on sn-devel-104
-rw-r--r--source4/dsdb/samdb/samdb.c54
1 files changed, 3 insertions, 51 deletions
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index cfbca40220..713448c4e8 100644
--- a/source4/dsdb/samdb/samdb.c
+++ b/source4/dsdb/samdb/samdb.c
@@ -44,51 +44,6 @@
#include "auth/auth.h"
/*
- make sure the static credentials are not freed
- */
-static int samdb_credentials_destructor(struct cli_credentials *creds)
-{
- return -1;
-}
-
-/*
- this returns a static set of system credentials. It is static so
- that we always get the same pointer in ldb_wrap_connect()
- */
-struct cli_credentials *samdb_credentials(struct loadparm_context *lp_ctx)
-{
- static struct cli_credentials *static_credentials;
- struct cli_credentials *cred;
- char *error_string;
-
- if (static_credentials) {
- return static_credentials;
- }
-
- cred = cli_credentials_init(talloc_autofree_context());
- if (!cred) {
- return NULL;
- }
- cli_credentials_set_conf(cred, lp_ctx);
-
- /* We don't want to use krb5 to talk to our samdb - recursion
- * here would be bad, and this account isn't in the KDC
- * anyway */
- cli_credentials_set_kerberos_state(cred, CRED_DONT_USE_KERBEROS);
-
- if (!NT_STATUS_IS_OK(cli_credentials_set_secrets(cred, lp_ctx, NULL, NULL,
- SECRETS_LDAP_FILTER, &error_string))) {
- DEBUG(5, ("(normal if no LDAP backend) %s", error_string));
- /* Perfectly OK - if not against an LDAP backend */
- talloc_free(cred);
- return NULL;
- }
- static_credentials = cred;
- talloc_set_destructor(cred, samdb_credentials_destructor);
- return cred;
-}
-
-/*
connect to the SAM database specified by URL
return an opaque context pointer on success, or NULL on failure
*/
@@ -100,16 +55,13 @@ struct ldb_context *samdb_connect_url(TALLOC_CTX *mem_ctx,
{
struct ldb_context *ldb;
struct dsdb_schema *schema;
- struct cli_credentials *credentials;
int ret;
- credentials = samdb_credentials(lp_ctx);
-
- ldb = ldb_wrap_find(url, ev_ctx, lp_ctx, session_info, credentials, flags);
+ ldb = ldb_wrap_find(url, ev_ctx, lp_ctx, session_info, NULL, flags);
if (ldb != NULL)
return talloc_reference(mem_ctx, ldb);
- ldb = samba_ldb_init(mem_ctx, ev_ctx, lp_ctx, session_info, credentials);
+ ldb = samba_ldb_init(mem_ctx, ev_ctx, lp_ctx, session_info, NULL);
if (ldb == NULL)
return NULL;
@@ -128,7 +80,7 @@ struct ldb_context *samdb_connect_url(TALLOC_CTX *mem_ctx,
dsdb_make_schema_global(ldb, schema);
}
- if (!ldb_wrap_add(url, ev_ctx, lp_ctx, session_info, credentials, flags, ldb)) {
+ if (!ldb_wrap_add(url, ev_ctx, lp_ctx, session_info, NULL, flags, ldb)) {
talloc_free(ldb);
return NULL;
}