[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-1129-gd73bde9

Günther Deschner gd at samba.org
Mon Jan 7 11:50:44 GMT 2008


The branch, v3-2-test has been updated
       via  d73bde99e8518607bb78b5625ce5fb1991d8e402 (commit)
       via  dd3fbd93b6e5fe8b5e3a3727a64a38d5ae46fcbf (commit)
       via  48f09ca376f9fc7923309f3466e5d72f7c21a56f (commit)
       via  bf9ce2a928e3136d3bfe368f75d5b99273c5b04f (commit)
       via  bc025a3860483e8cdbd0f61579689c9edadd3af0 (commit)
      from  6f673b7f10c145d88e6a6d3072b5f8cd98837304 (commit)

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


- Log -----------------------------------------------------------------
commit d73bde99e8518607bb78b5625ce5fb1991d8e402
Author: Günther Deschner <gd at samba.org>
Date:   Mon Jan 7 12:44:25 2008 +0100

    Fix two memleaks in libnetapi.
    
    Guenther

commit dd3fbd93b6e5fe8b5e3a3727a64a38d5ae46fcbf
Author: Günther Deschner <gd at samba.org>
Date:   Mon Jan 7 12:42:16 2008 +0100

    Add secrets_shutdown().
    
    Guenther

commit 48f09ca376f9fc7923309f3466e5d72f7c21a56f
Author: Günther Deschner <gd at samba.org>
Date:   Mon Jan 7 12:41:18 2008 +0100

    In gfree_debugsyms() free the format_bufr as well.
    
    Guenther

commit bf9ce2a928e3136d3bfe368f75d5b99273c5b04f
Author: Günther Deschner <gd at samba.org>
Date:   Mon Jan 7 12:19:56 2008 +0100

    Failure while unjoining a domain is non-critical.
    Just continue joining to the workgroup in that case.
    
    Guenther

commit bc025a3860483e8cdbd0f61579689c9edadd3af0
Author: Günther Deschner <gd at samba.org>
Date:   Fri Jan 4 23:11:53 2008 +0100

    Only create machine account in libnetjoin when requested to.
    
    Guenther

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

Summary of changes:
 source/lib/debug.c                                 |    2 +
 .../examples/netdomjoin-gui/netdomjoin-gui.c       |   10 +-------
 source/lib/netapi/netapi.c                         |    5 +++-
 source/libnet/libnet_join.c                        |   22 +++++++++++--------
 source/passdb/secrets.c                            |   13 +++++++++++
 5 files changed, 34 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/debug.c b/source/lib/debug.c
index 9ea2dc1..6c1bfea 100644
--- a/source/lib/debug.c
+++ b/source/lib/debug.c
@@ -199,6 +199,8 @@ void gfree_debugsyms(void)
 
 	if ( DEBUGLEVEL_CLASS_ISSET != &debug_all_class_isset_hack )
 		SAFE_FREE( DEBUGLEVEL_CLASS_ISSET );
+
+	SAFE_FREE(format_bufr);
 }
 
 /****************************************************************************
diff --git a/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
index d12e66b..1e1681b 100644
--- a/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
+++ b/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
@@ -449,14 +449,8 @@ static void callback_do_join(GtkWidget *widget,
 							initial_workgroup_type,
 							state->name_buffer_initial,
 							err_str);
-
-			g_signal_connect_swapped(dialog, "response",
-						 G_CALLBACK(gtk_widget_destroy),
-						 dialog);
-
-			gtk_widget_show(dialog);
-
-			return;
+			gtk_dialog_run(GTK_DIALOG(dialog));
+			gtk_widget_destroy(dialog);
 		}
 
 	}
diff --git a/source/lib/netapi/netapi.c b/source/lib/netapi/netapi.c
index 032798d..9c418f2 100644
--- a/source/lib/netapi/netapi.c
+++ b/source/lib/netapi/netapi.c
@@ -1,7 +1,7 @@
 /*
  *  Unix SMB/CIFS implementation.
  *  NetApi Support
- *  Copyright (C) Guenther Deschner 2007
+ *  Copyright (C) Guenther Deschner 2007-2008
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -90,6 +90,9 @@ NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx)
 	gfree_charcnv();
 	gfree_interfaces();
 
+	gencache_shutdown();
+	secrets_shutdown();
+
 	TALLOC_FREE(ctx);
 	TALLOC_FREE(frame);
 
diff --git a/source/libnet/libnet_join.c b/source/libnet/libnet_join.c
index 95b643f..36d5c0a 100644
--- a/source/libnet/libnet_join.c
+++ b/source/libnet/libnet_join.c
@@ -138,17 +138,21 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
 	strlower_m(acct_name);
 	const_acct_name = acct_name;
 
-	status = rpccli_samr_create_dom_user(pipe_hnd, mem_ctx, &domain_pol,
-					     acct_name, ACB_WSTRUST,
-					     0xe005000b, &user_pol, &user_rid);
-	if (NT_STATUS_EQUAL(status, NT_STATUS_USER_EXISTS)) {
-		if (!(r->in.join_flags & WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED)) {
-			goto done;
+	if (r->in.join_flags & WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE) {
+		status = rpccli_samr_create_dom_user(pipe_hnd, mem_ctx,
+						     &domain_pol,
+						     acct_name, ACB_WSTRUST,
+						     0xe005000b, &user_pol,
+						     &user_rid);
+		if (NT_STATUS_EQUAL(status, NT_STATUS_USER_EXISTS)) {
+			if (!(r->in.join_flags & WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED)) {
+				goto done;
+			}
 		}
-	}
 
-	if (NT_STATUS_IS_OK(status)) {
-		rpccli_samr_close(pipe_hnd, mem_ctx, &user_pol);
+		if (NT_STATUS_IS_OK(status)) {
+			rpccli_samr_close(pipe_hnd, mem_ctx, &user_pol);
+		}
 	}
 
 	status = rpccli_samr_lookup_names(pipe_hnd, mem_ctx,
diff --git a/source/passdb/secrets.c b/source/passdb/secrets.c
index 8e0afe7..330ffbc 100644
--- a/source/passdb/secrets.c
+++ b/source/passdb/secrets.c
@@ -94,6 +94,19 @@ bool secrets_init(void)
 	return True;
 }
 
+/*
+ * close secrets.tdb
+ */
+void secrets_shutdown(void)
+{
+	if (!tdb) {
+		return;
+	}
+
+	tdb_close(tdb);
+	tdb = NULL;
+}
+
 /* read a entry from the secrets database - the caller must free the result
    if size is non-null then the size of the entry is put in there
  */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list