[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-0pre3-82-g2d3f489

Karolin Seeger kseeger at samba.org
Thu May 15 08:08:17 GMT 2008


The branch, v3-2-stable has been updated
       via  2d3f4897076663505aec23eb3ffaa1ae54cd39a5 (commit)
      from  3ce33843d767aad1f01fab20ba4c2bb781f8c21a (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable


- Log -----------------------------------------------------------------
commit 2d3f4897076663505aec23eb3ffaa1ae54cd39a5
Author: Günther Deschner <gd at samba.org>
Date:   Wed May 14 23:50:25 2008 +0200

    Fix Bug #5465 (joining with createcomputer=ou1/ou2/ou3).
    
    Guenther
    (cherry picked from commit f3251ba03a69c2fd0335861177159a32b2bc9477)
    (cherry picked from commit 6d445c134d4d78f8261c998a5a83feaafb01bbca)

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

Summary of changes:
 source/libads/ldap.c        |   10 +++++-----
 source/libnet/libnet_join.c |    3 +--
 2 files changed, 6 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libads/ldap.c b/source/libads/ldap.c
index 9321302..181da9e 100644
--- a/source/libads/ldap.c
+++ b/source/libads/ldap.c
@@ -3595,18 +3595,18 @@ const char *ads_get_extended_right_name_by_guid(ADS_STRUCT *ads,
 
 ADS_STATUS ads_check_ou_dn(TALLOC_CTX *mem_ctx,
 			   ADS_STRUCT *ads,
-			   const char *account_ou)
+			   const char **account_ou)
 {
 	struct ldb_dn *name_dn = NULL;
 	const char *name = NULL;
 	char *ou_string = NULL;
 
-	name_dn = ldb_dn_explode(mem_ctx, account_ou);
+	name_dn = ldb_dn_explode(mem_ctx, *account_ou);
 	if (name_dn) {
 		return ADS_SUCCESS;
 	}
 
-	ou_string = ads_ou_string(ads, account_ou);
+	ou_string = ads_ou_string(ads, *account_ou);
 	if (!ou_string) {
 		return ADS_ERROR_LDAP(LDAP_INVALID_DN_SYNTAX);
 	}
@@ -3623,8 +3623,8 @@ ADS_STATUS ads_check_ou_dn(TALLOC_CTX *mem_ctx,
 		return ADS_ERROR_LDAP(LDAP_INVALID_DN_SYNTAX);
 	}
 
-	account_ou = talloc_strdup(mem_ctx, name);
-	if (!account_ou) {
+	*account_ou = talloc_strdup(mem_ctx, name);
+	if (!*account_ou) {
 		return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
 	}
 
diff --git a/source/libnet/libnet_join.c b/source/libnet/libnet_join.c
index 9834a37..3f48284 100644
--- a/source/libnet/libnet_join.c
+++ b/source/libnet/libnet_join.c
@@ -207,7 +207,7 @@ static ADS_STATUS libnet_join_precreate_machine_acct(TALLOC_CTX *mem_ctx,
 	const char *attrs[] = { "dn", NULL };
 	bool moved = false;
 
-	status = ads_check_ou_dn(mem_ctx, r->in.ads, r->in.account_ou);
+	status = ads_check_ou_dn(mem_ctx, r->in.ads, &r->in.account_ou);
 	if (!ADS_ERR_OK(status)) {
 		return status;
 	}
@@ -1486,7 +1486,6 @@ static int libnet_destroy_UnjoinCtx(struct libnet_UnjoinCtx *r)
 		unsetenv(KRB5_ENV_CCNAME);
 	}
 
-
 	return 0;
 }
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list