summaryrefslogtreecommitdiff
path: root/source3/utils/net_lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils/net_lookup.c')
-rw-r--r--source3/utils/net_lookup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c
index 8e223e67f3..19ba5ae7f4 100644
--- a/source3/utils/net_lookup.c
+++ b/source3/utils/net_lookup.c
@@ -84,7 +84,7 @@ static int net_lookup_ldap(int argc, const char **argv)
struct hostent *hostent;
struct dns_rr_srv *dcs = NULL;
int numdcs = 0;
- char *sitename = sitename_fetch();
+ char *sitename;
TALLOC_CTX *ctx;
NTSTATUS status;
@@ -93,6 +93,8 @@ static int net_lookup_ldap(int argc, const char **argv)
else
domain = opt_target_workgroup;
+ sitename = sitename_fetch(domain);
+
if ( (ctx = talloc_init("net_lookup_ldap")) == NULL ) {
d_fprintf(stderr, "net_lookup_ldap: talloc_inti() failed!\n");
SAFE_FREE(sitename);
@@ -171,7 +173,7 @@ static int net_lookup_dc(int argc, const char **argv)
asprintf(&pdc_str, "%s", inet_ntoa(addr));
d_printf("%s\n", pdc_str);
- sitename = sitename_fetch();
+ sitename = sitename_fetch(domain);
if (!NT_STATUS_IS_OK(get_sorted_dc_list(domain, sitename, &ip_list, &count, False))) {
SAFE_FREE(pdc_str);
SAFE_FREE(sitename);