svn commit: samba r20102 - in branches/SAMBA_4_0/source/libnet: .

abartlet at samba.org abartlet at samba.org
Sun Dec 10 23:28:37 GMT 2006


Author: abartlet
Date: 2006-12-10 23:28:36 +0000 (Sun, 10 Dec 2006)
New Revision: 20102

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20102

Log:
Do not reference remote_ldb before we initialise it.  This should fix
up many of the build farm failures.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/libnet/libnet_join.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_join.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_join.c	2006-12-10 22:24:28 UTC (rev 20101)
+++ branches/SAMBA_4_0/source/libnet/libnet_join.c	2006-12-10 23:28:36 UTC (rev 20102)
@@ -219,14 +219,6 @@
 	/* Store the DN of our machine account. */
 	account_dn_str = r_crack_names.out.ctr.ctr1->array[0].result_name;
 
-	account_dn = ldb_dn_new(tmp_ctx, remote_ldb, account_dn_str);
-	if (! ldb_dn_validate(account_dn)) {
-		r->out.error_string = talloc_asprintf(r, "Invalid account dn: %s",
-						      account_dn_str);
-		talloc_free(tmp_ctx);
-		return NT_STATUS_UNSUCCESSFUL;
-	}
-
 	/* Now we know the user's DN, open with LDAP, read and modify a few things */
 
 	remote_ldb_url = talloc_asprintf(tmp_ctx, "ldap://%s", 
@@ -245,6 +237,14 @@
 		return NT_STATUS_UNSUCCESSFUL;
 	}
 
+	account_dn = ldb_dn_new(tmp_ctx, remote_ldb, account_dn_str);
+	if (! ldb_dn_validate(account_dn)) {
+		r->out.error_string = talloc_asprintf(r, "Invalid account dn: %s",
+						      account_dn_str);
+		talloc_free(tmp_ctx);
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
 	/* search for the user's record */
 	ret = ldb_search(remote_ldb, account_dn, LDB_SCOPE_BASE, 
 			 NULL, attrs, &res);



More information about the samba-cvs mailing list