svn commit: samba r22425 - in branches/SAMBA_3_0/source/libsmb: .

idra at samba.org idra at samba.org
Sat Apr 21 20:43:55 GMT 2007


Author: idra
Date: 2007-04-21 20:43:54 +0000 (Sat, 21 Apr 2007)
New Revision: 22425

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22425

Log:

Avoid to segfault if we only have the realm.


Modified:
   branches/SAMBA_3_0/source/libsmb/namequery_dc.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/namequery_dc.c
===================================================================
--- branches/SAMBA_3_0/source/libsmb/namequery_dc.c	2007-04-21 08:04:58 UTC (rev 22424)
+++ branches/SAMBA_3_0/source/libsmb/namequery_dc.c	2007-04-21 20:43:54 UTC (rev 22425)
@@ -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 */



More information about the samba-cvs mailing list