summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_ads.c3
-rw-r--r--source3/utils/net_dns.c12
-rw-r--r--source3/utils/net_dom.c4
-rw-r--r--source3/utils/net_lookup.c2
4 files changed, 10 insertions, 11 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 310af82beb..80f6ba9001 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1446,7 +1446,6 @@ int net_ads_join(int argc, const char **argv)
ADS_STRUCT *ads = NULL;
ADS_STATUS status;
NTSTATUS nt_status;
- char *machine_account = NULL;
char *short_domain_name = NULL;
char *tmp_password, *password;
TALLOC_CTX *ctx = NULL;
@@ -1684,7 +1683,6 @@ int net_ads_join(int argc, const char **argv)
d_printf("Joined '%s' to realm '%s'\n", global_myname(), ads->server.realm);
- SAFE_FREE(machine_account);
TALLOC_FREE( ctx );
ads_destroy(&ads);
@@ -1694,7 +1692,6 @@ fail:
/* issue an overall failure message at the end. */
d_printf("Failed to join domain: %s\n", get_friendly_nt_error_msg(nt_status));
- SAFE_FREE(machine_account);
TALLOC_FREE( ctx );
ads_destroy(&ads);
diff --git a/source3/utils/net_dns.c b/source3/utils/net_dns.c
index c661c77ce6..44a0b46e4e 100644
--- a/source3/utils/net_dns.c
+++ b/source3/utils/net_dns.c
@@ -47,7 +47,7 @@ DNS_ERROR DoDNSUpdate(char *pszServerName,
OM_uint32 minor;
struct dns_update_request *req, *resp;
- if ( (num_addrs <= 0) || !iplist ) {
+ if ( (num_addrs <= 0) || !sslist ) {
return ERROR_DNS_INVALID_PARAMETER;
}
@@ -167,14 +167,16 @@ int get_my_ip_address( struct sockaddr_storage **pp_ss )
}
#if defined(HAVE_IPV6)
if ((nics[i].ip.ss_family == AF_INET)) {
- memcpy(&list[count++], &nics[i].ip);
+ memcpy(&list[count++], &nics[i].ip,
+ sizeof(struct sockaddr_storage));
} else
#endif
- if ((nics[i].ip.ss_family == AF_INET)) {
- memcpy(&list[count++], &nics[i].ip);
+ if (nics[i].ip.ss_family == AF_INET) {
+ memcpy(&list[count++], &nics[i].ip,
+ sizeof(struct sockaddr_storage));
}
}
- *ips = list;
+ *pp_ss = list;
return count;
}
diff --git a/source3/utils/net_dom.c b/source3/utils/net_dom.c
index 3a8338ec70..30993ae2fa 100644
--- a/source3/utils/net_dom.c
+++ b/source3/utils/net_dom.c
@@ -101,7 +101,7 @@ static int net_dom_unjoin(int argc, const char **argv)
status = NetUnjoinDomain(server_name, account, password, unjoin_flags);
if (status != 0) {
printf("Failed to unjoin domain: %s\n",
- libnetapi_errstr(ctx, status));
+ libnetapi_errstr(status));
goto done;
}
@@ -215,7 +215,7 @@ static int net_dom_join(int argc, const char **argv)
Account, password, join_flags);
if (status != 0) {
printf("Failed to join domain: %s\n",
- libnetapi_errstr(ctx, status));
+ libnetapi_errstr(status));
goto done;
}
diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c
index 20298faa29..765971fba3 100644
--- a/source3/utils/net_lookup.c
+++ b/source3/utils/net_lookup.c
@@ -401,7 +401,7 @@ static int net_lookup_dsgetdcname(int argc, const char **argv)
site_name = sitename_fetch(domain_name);
}
- status = DsGetDcName(mem_ctx, NULL, domain_name, NULL, site_name,
+ status = dsgetdcname(mem_ctx, NULL, domain_name, NULL, site_name,
flags, &info);
if (!NT_STATUS_IS_OK(status)) {
d_printf("failed with: %s\n", nt_errstr(status));