summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-07 14:51:11 +0100
committerGünther Deschner <gd@samba.org>2008-01-07 14:53:16 +0100
commitcab9aa525dbbf4ba65acb43763298bfb30d4fca4 (patch)
tree47ff5a3605dbd6bdae47412d0fbb545bb3b3f946 /source3/winbindd
parent02f67cfcfa09245e79ecbe41dfadd04f5418253a (diff)
downloadsamba-cab9aa525dbbf4ba65acb43763298bfb30d4fca4.tar.gz
samba-cab9aa525dbbf4ba65acb43763298bfb30d4fca4.tar.bz2
samba-cab9aa525dbbf4ba65acb43763298bfb30d4fca4.zip
Fix build warning.
Guenther (This used to be commit 73233a06d6f0f1346c48b465750af4b532cd7306)
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_cm.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 99e401d53f..a9155a5763 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/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;