summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-08-19 15:22:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:12 -0500
commitb2f39d19e3f10f141752be98b41eb1c7622fa760 (patch)
treebcbdf2d9f4947e05486f5acb2bc432fd14f97020 /source4
parent618368ead66faf93eac2a8087934ea7590cc9a4b (diff)
downloadsamba-b2f39d19e3f10f141752be98b41eb1c7622fa760.tar.gz
samba-b2f39d19e3f10f141752be98b41eb1c7622fa760.tar.bz2
samba-b2f39d19e3f10f141752be98b41eb1c7622fa760.zip
r1927: allow the domain to be a ip address
metze (This used to be commit d0e518e7d0edcf64a3d7173ff8d38f221db1ce6e)
Diffstat (limited to 'source4')
-rw-r--r--source4/libnet/libnet_rpc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/libnet/libnet_rpc.c b/source4/libnet/libnet_rpc.c
index 7cee7681e8..4896236e68 100644
--- a/source4/libnet/libnet_rpc.c
+++ b/source4/libnet/libnet_rpc.c
@@ -26,6 +26,11 @@ static NTSTATUS libnet_find_pdc_generic(struct libnet_context *ctx, TALLOC_CTX *
BOOL ret;
struct in_addr ip;
+ if (is_ipaddress(r->generic.in.domain_name)) {
+ r->generic.out.pdc_name = r->generic.in.domain_name;
+ return NT_STATUS_OK;
+ }
+
ret = get_pdc_ip(mem_ctx, r->generic.in.domain_name, &ip);
if (!ret) {
/* fallback to a workstation name */