diff options
author | Simo Sorce <idra@samba.org> | 2007-04-21 20:43:54 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:19:34 -0500 |
commit | b304cabb4472ad0e89de5c0c678a10c83ec50ee9 (patch) | |
tree | 0617bebef0dad56af1f0b0ea7c4c7916e7e6c0f0 /source3 | |
parent | 82979331427c4004c15f4a247b17bf4271b3bca8 (diff) | |
download | samba-b304cabb4472ad0e89de5c0c678a10c83ec50ee9.tar.gz samba-b304cabb4472ad0e89de5c0c678a10c83ec50ee9.tar.bz2 samba-b304cabb4472ad0e89de5c0c678a10c83ec50ee9.zip |
r22425: Avoid to segfault if we only have the realm.
(This used to be commit ace1520270d19d41c24236d4e26ccf77071ebeb9)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/namequery_dc.c | 5 |
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 */ |