[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Mon Oct 31 23:34:01 MDT 2011


The branch, master has been updated
       via  aabda85 s4-dsdb Remove LDAP backend credentials support
      from  06f4672 s4:torture:smb2: add a new durable-open.upgrade2 test to test all upgrade combinations

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit aabda85a2fc9f6763abd56d61ff819012f2225ad
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Nov 1 12:11:57 2011 +1100

    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 at samba.org>
    Autobuild-Date: Tue Nov  1 06:32:52 CET 2011 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source4/dsdb/samdb/samdb.c |   54 ++-----------------------------------------
 1 files changed, 3 insertions(+), 51 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index cfbca40..713448c 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;
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list