Author: idra Date: 2007-04-21 20:44:19 +0000 (Sat, 21 Apr 2007) New Revision: 22426
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22426 Log: Avoid to segfault if we only have the realm Modified: branches/SAMBA_3_0_25/source/libsmb/namequery_dc.c Changeset: Modified: branches/SAMBA_3_0_25/source/libsmb/namequery_dc.c =================================================================== --- branches/SAMBA_3_0_25/source/libsmb/namequery_dc.c 2007-04-21 20:43:54 UTC (rev 22425) +++ branches/SAMBA_3_0_25/source/libsmb/namequery_dc.c 2007-04-21 20:44:19 UTC (rev 22426) @@ -215,6 +215,11 @@ 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 */
