Fix build warning.
authorGünther Deschner <gd@samba.org>
Mon, 7 Jan 2008 13:51:11 +0000 (14:51 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 7 Jan 2008 13:53:16 +0000 (14:53 +0100)
Guenther
(This used to be commit 73233a06d6f0f1346c48b465750af4b532cd7306)

source3/winbindd/winbindd_cm.c

index 99e401d53f24d2dcb6fcf442a5a7ab4a5679a805..a9155a57633d69b1f55f889a85763b639cf87e10 100644 (file)
@@ -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;