[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-1131-g73233a0

Günther Deschner gd at samba.org
Mon Jan 7 13:56:03 GMT 2008


The branch, v3-2-test has been updated
       via  73233a06d6f0f1346c48b465750af4b532cd7306 (commit)
       via  f3ebb4f96bb0364dae9924e798652e759b63bb52 (commit)
      from  d73bde99e8518607bb78b5625ce5fb1991d8e402 (commit)

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


- Log -----------------------------------------------------------------
commit 73233a06d6f0f1346c48b465750af4b532cd7306
Author: Günther Deschner <gd at samba.org>
Date:   Mon Jan 7 14:51:11 2008 +0100

    Fix build warning.
    
    Guenther

commit f3ebb4f96bb0364dae9924e798652e759b63bb52
Author: Günther Deschner <gd at samba.org>
Date:   Mon Jan 7 14:15:48 2008 +0100

    Add free_local_machine_name().
    
    Guenther

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

Summary of changes:
 source/lib/substitute.c       |    5 +++++
 source/lib/util.c             |    1 +
 source/winbindd/winbindd_cm.c |   34 ++++++++++++++++++----------------
 3 files changed, 24 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/substitute.c b/source/lib/substitute.c
index 80feee9..59b54c4 100644
--- a/source/lib/substitute.c
+++ b/source/lib/substitute.c
@@ -34,6 +34,11 @@ fstring remote_proto="UNKNOWN";
 
 static char *local_machine;
 
+void free_local_machine_name(void)
+{
+	SAFE_FREE(local_machine);
+}
+
 bool set_local_machine_name(const char *local_name, bool perm)
 {
 	static bool already_perm = false;
diff --git a/source/lib/util.c b/source/lib/util.c
index c69a145..25b2700 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -183,6 +183,7 @@ void gfree_names(void)
 	SAFE_FREE( smb_myworkgroup );
 	SAFE_FREE( smb_scope );
 	free_netbios_names_array();
+	free_local_machine_name();
 }
 
 void gfree_all( void )
diff --git a/source/winbindd/winbindd_cm.c b/source/winbindd/winbindd_cm.c
index 99e401d..a9155a5 100644
--- a/source/winbindd/winbindd_cm.c
+++ b/source/winbindd/winbindd_cm.c
@@ -74,7 +74,7 @@ extern bool override_logfile;
 
 static NTSTATUS init_dc_connection_network(struct winbindd_domain *domain);
 static void set_dc_type_and_flags( struct winbindd_domain *domain );
-static bool get_dcs(TALLOC_CTX *mem_ctx, const struct winbindd_domain *domain,
+static bool get_dcs(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
 		    struct dc_name_ip **dcs, int *num_dcs);
 
 /****************************************************************
@@ -560,7 +560,7 @@ static void cm_get_ipc_userpass(char **username, char **domain, char **password)
 	}
 }
 
-static bool get_dc_name_via_netlogon(const struct winbindd_domain *domain,
+static bool get_dc_name_via_netlogon(struct winbindd_domain *domain,
 				     fstring dcname,
 				     struct sockaddr_storage *dc_ss)
 {
@@ -600,12 +600,12 @@ static bool get_dc_name_via_netlogon(const struct winbindd_domain *domain,
 	   35 seconds should do it. */
 
 	orig_timeout = cli_set_timeout(netlogon_pipe->cli, 35000);
-	
+
 	if (our_domain->active_directory) {
 		struct DS_DOMAIN_CONTROLLER_INFO *domain_info = NULL;
-		
-		werr = rpccli_netlogon_dsr_getdcname(netlogon_pipe, 
-						     mem_ctx, 
+
+		werr = rpccli_netlogon_dsr_getdcname(netlogon_pipe,
+						     mem_ctx,
 						     our_domain->dcname,
 						     domain->name,
 						     NULL,
@@ -615,19 +615,21 @@ static bool get_dc_name_via_netlogon(const struct winbindd_domain *domain,
 		if (W_ERROR_IS_OK(werr)) {
 			fstrcpy(tmp, domain_info->domain_controller_name);
 			if (strlen(domain->alt_name) == 0) {
-				fstrcpy(domain->alt_name, 
-					CONST_DISCARD(char*, domain_info->domain_name));
+				fstrcpy(domain->alt_name,
+					domain_info->domain_name);
 			}
 			if (strlen(domain->forest_name) == 0) {
-				fstrcpy(domain->forest_name, 
-					CONST_DISCARD(char*, domain_info->dns_forest_name));
+				fstrcpy(domain->forest_name,
+					domain_info->dns_forest_name);
 			}
-		}		
+		}
 	} else {
-		
-		werr = rpccli_netlogon_getanydcname(netlogon_pipe, mem_ctx, 
+
+		werr = rpccli_netlogon_getanydcname(netlogon_pipe,
+						    mem_ctx,
 						    our_domain->dcname,
-					    domain->name, &tmp);
+						    domain->name,
+						    &tmp);
 	}
 
 	/* And restore our original timeout. */
@@ -1245,7 +1247,7 @@ static bool dcip_to_name(const struct winbindd_domain *domain,
  the dcs[]  with results.
 *******************************************************************/
 
-static bool get_dcs(TALLOC_CTX *mem_ctx, const struct winbindd_domain *domain,
+static bool get_dcs(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
 		    struct dc_name_ip **dcs, int *num_dcs)
 {
 	fstring dcname;
@@ -1348,7 +1350,7 @@ static bool get_dcs(TALLOC_CTX *mem_ctx, const struct winbindd_domain *domain,
 }
 
 static bool find_new_dc(TALLOC_CTX *mem_ctx,
-			const struct winbindd_domain *domain,
+			struct winbindd_domain *domain,
 			fstring dcname, struct sockaddr_storage *pss, int *fd)
 {
 	struct dc_name_ip *dcs = NULL;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list