summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/namequery_dc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libsmb/namequery_dc.c b/source3/libsmb/namequery_dc.c
index 110b9986b7..65e860d45e 100644
--- a/source3/libsmb/namequery_dc.c
+++ b/source3/libsmb/namequery_dc.c
@@ -215,6 +215,11 @@ BOOL get_dc_name(const char *domain, const char *realm, fstring srv_name, struct
if ( (our_domain && lp_security()==SEC_ADS) || realm ) {
ret = ads_dc_name(domain, realm, &dc_ip, srv_name);
}
+
+ if (!domain) {
+ /* if we have only the realm we can't do anything else */
+ return False;
+ }
if (!ret) {
/* fall back on rpc methods if the ADS methods fail */