[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-2513-g69e93e2

Günther Deschner gd at samba.org
Thu Jun 5 08:26:26 GMT 2008


The branch, v3-2-test has been updated
       via  69e93e2b88c880f770b416b6f5645b8d4c8bf5d8 (commit)
       via  12d333fd90450fdd3fa8029502509d872cf5cae0 (commit)
       via  1c901c82235a4d6bb4750151caebda0554245f05 (commit)
       via  62a2c988f37354e323e1dd8065b4a93edb169ac1 (commit)
      from  415d2cde61607eab1495cdcc48ccede1ff9900d5 (commit)

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


- Log -----------------------------------------------------------------
commit 69e93e2b88c880f770b416b6f5645b8d4c8bf5d8
Author: Günther Deschner <gd at samba.org>
Date:   Tue Jun 3 20:41:55 2008 +0200

    build: fix build warning.
    
    Guenther
    (cherry picked from commit 62fcad0c0548ab53e9c20cfd6301972c68172b95)

commit 12d333fd90450fdd3fa8029502509d872cf5cae0
Author: Günther Deschner <gd at samba.org>
Date:   Wed Jun 4 18:05:15 2008 +0200

    libnetjoin: correctly copy returned lsa policy sid.
    
    Guenther

commit 1c901c82235a4d6bb4750151caebda0554245f05
Author: Günther Deschner <gd at samba.org>
Date:   Wed Jun 4 02:43:41 2008 +0200

    libnetjoin: only close existing policy handles while unjoining.
    
    Guenther

commit 62a2c988f37354e323e1dd8065b4a93edb169ac1
Author: Günther Deschner <gd at samba.org>
Date:   Wed Jun 4 01:32:15 2008 +0200

    libnetjoin: delete possible "realm" leftover parameter.
    
    Guenther
    (cherry picked from commit d7ba98cc3f2d037ec01e079220a66da508b104b0)

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

Summary of changes:
 source/lib/smbldap.c        |    2 +-
 source/libnet/libnet_join.c |   20 ++++++++++++++++----
 2 files changed, 17 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/smbldap.c b/source/lib/smbldap.c
index 0598b78..4f5909e 100644
--- a/source/lib/smbldap.c
+++ b/source/lib/smbldap.c
@@ -692,7 +692,7 @@ int smb_ldap_setup_conn(LDAP **ldap_struct, const char *uri)
 		rc = ldap_set_option(*ldap_struct, LDAP_OPT_NETWORK_TIMEOUT, &ct);
 		if (rc != LDAP_SUCCESS) {
 			DEBUG(0,("Failed to setup an ldap connection timeout %d: %s\n",
-				ct.tv_sec, ldap_err2string(rc)));
+				(int)ct.tv_sec, ldap_err2string(rc)));
 		}
 	}
 #endif
diff --git a/source/libnet/libnet_join.c b/source/libnet/libnet_join.c
index 922da0d..a69ccea 100644
--- a/source/libnet/libnet_join.c
+++ b/source/libnet/libnet_join.c
@@ -689,7 +689,8 @@ static NTSTATUS libnet_join_lookup_dc_rpc(TALLOC_CTX *mem_ctx,
 		r->out.domain_is_ad = true;
 		r->out.netbios_domain_name = info->dns.name.string;
 		r->out.dns_domain_name = info->dns.dns_domain.string;
-		r->out.domain_sid = info->dns.sid;
+		r->out.domain_sid = sid_dup_talloc(mem_ctx, info->dns.sid);
+		NT_STATUS_HAVE_NO_MEMORY(r->out.domain_sid);
 	}
 
 	if (!NT_STATUS_IS_OK(status)) {
@@ -702,7 +703,8 @@ static NTSTATUS libnet_join_lookup_dc_rpc(TALLOC_CTX *mem_ctx,
 		}
 
 		r->out.netbios_domain_name = info->account_domain.name.string;
-		r->out.domain_sid = info->account_domain.sid;
+		r->out.domain_sid = sid_dup_talloc(mem_ctx, info->account_domain.sid);
+		NT_STATUS_HAVE_NO_MEMORY(r->out.domain_sid);
 	}
 
 	rpccli_lsa_Close(pipe_hnd, mem_ctx, &lsa_pol);
@@ -1114,6 +1116,10 @@ static NTSTATUS libnet_join_unjoindomain_rpc(TALLOC_CTX *mem_ctx,
 	struct samr_Ids name_types;
 	union samr_UserInfo *info = NULL;
 
+	ZERO_STRUCT(sam_pol);
+	ZERO_STRUCT(domain_pol);
+	ZERO_STRUCT(user_pol);
+
 	status = cli_full_connection(&cli, NULL,
 				     r->in.dc_name,
 				     NULL, 0,
@@ -1215,8 +1221,12 @@ static NTSTATUS libnet_join_unjoindomain_rpc(TALLOC_CTX *mem_ctx,
 
 done:
 	if (pipe_hnd) {
-		rpccli_samr_Close(pipe_hnd, mem_ctx, &domain_pol);
-		rpccli_samr_Close(pipe_hnd, mem_ctx, &sam_pol);
+		if (is_valid_policy_hnd(&domain_pol)) {
+			rpccli_samr_Close(pipe_hnd, mem_ctx, &domain_pol);
+		}
+		if (is_valid_policy_hnd(&sam_pol)) {
+			rpccli_samr_Close(pipe_hnd, mem_ctx, &sam_pol);
+		}
 		cli_rpc_pipe_close(pipe_hnd);
 	}
 
@@ -1247,6 +1257,8 @@ static WERROR do_join_modify_vals_config(struct libnet_JoinCtx *r)
 
 		werr = smbconf_set_global_parameter(ctx, "workgroup",
 						    r->in.domain_name);
+
+		smbconf_delete_global_parameter(ctx, "realm");
 		goto done;
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list