[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-1404-g86f3a2e

Andrew Tridgell tridge at samba.org
Sun Sep 6 18:34:34 MDT 2009


The branch, master has been updated
       via  86f3a2ea0984e0a28fab2228ff7bd4f97543d098 (commit)
       via  8ce73c6c50ef36b413a40640c04180a614cc2f68 (commit)
      from  04ea250aebe619d7ec25426be9d395f1dd635c90 (commit)

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


- Log -----------------------------------------------------------------
commit 86f3a2ea0984e0a28fab2228ff7bd4f97543d098
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Sep 7 10:33:47 2009 +1000

    s4: fixed the secrets.ldb construction in libnet
    
    on a vampire join we were not putting the right attributes and
    objectclass on the secrets.ldb record

commit 8ce73c6c50ef36b413a40640c04180a614cc2f68
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Sep 7 10:33:02 2009 +1000

    s4: the secrets.ldb module needs the loadparm opaque setup

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

Summary of changes:
 source4/libnet/libnet_join.c |   16 ++++++++--------
 source4/param/secrets.c      |    7 +++++++
 2 files changed, 15 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index 6f32a6e..86ad685 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -940,13 +940,6 @@ NTSTATUS libnet_set_join_secrets(struct libnet_context *ctx,
 			talloc_free(tmp_mem);
 			return NT_STATUS_NO_MEMORY;
 		}
-
-		rtn = samdb_msg_add_string(ldb, tmp_mem, msg, "objectClass", "primaryDomain");
-		if (rtn == -1) {
-			r->out.error_string = NULL;
-			talloc_free(tmp_mem);
-			return NT_STATUS_NO_MEMORY;
-		}
 	}
 
 	rtn = samdb_msg_add_string(ldb, tmp_mem, msg, "objectClass", "primaryDomain");
@@ -956,6 +949,13 @@ NTSTATUS libnet_set_join_secrets(struct libnet_context *ctx,
 		return NT_STATUS_NO_MEMORY;
 	}
 
+	rtn = samdb_msg_add_string(ldb, tmp_mem, msg, "objectClass", "kerberosSecret");
+	if (rtn == -1) {
+		r->out.error_string = NULL;
+		talloc_free(tmp_mem);
+		return NT_STATUS_NO_MEMORY;
+	}
+
 	rtn = samdb_msg_add_string(ldb, tmp_mem, msg, "secret", r->in.join_password);
 	if (rtn == -1) {
 		r->out.error_string = NULL;
@@ -1008,7 +1008,7 @@ NTSTATUS libnet_set_join_secrets(struct libnet_context *ctx,
 			   "(|" SECRETS_PRIMARY_DOMAIN_FILTER "(realm=%s))",
 			   r->in.domain_name, r->in.realm);
 	if (ret == 0) {
-		rtn = samdb_msg_set_string(ldb, tmp_mem, msg, "secretsKeytab", "secrets.keytab");
+		rtn = samdb_msg_set_string(ldb, tmp_mem, msg, "privateKeytab", "secrets.keytab");
 		if (rtn == -1) {
 			r->out.error_string = NULL;
 			talloc_free(tmp_mem);
diff --git a/source4/param/secrets.c b/source4/param/secrets.c
index 6c6f7c2..f21be82 100644
--- a/source4/param/secrets.c
+++ b/source4/param/secrets.c
@@ -119,6 +119,13 @@ struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx,
 		return NULL;
 	}
 
+	/* the update_keytab module relies on this being setup */
+	if (ldb_set_opaque(ldb, "loadparm", lp_ctx) != LDB_SUCCESS) {
+		talloc_free(path);
+		talloc_free(ldb);
+		return NULL;
+	}
+
 	talloc_free(path);
 	
 	return ldb;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list