svn commit: samba r3100 - in branches/SAMBA_4_0/source/lib/cmdline: .

metze at samba.org metze at samba.org
Thu Oct 21 00:26:49 GMT 2004


Author: metze
Date: 2004-10-21 00:26:43 +0000 (Thu, 21 Oct 2004)
New Revision: 3100

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/lib/cmdline&rev=3100&nolog=1

Log:
support 'bin/smbclient //w2k3-101/c$ -U \\administrator at w2k3.vmnet1.vm.base'

we need to send an empty string as userdomain in this case.
fix bug #1317 in the client side

metze

Modified:
   branches/SAMBA_4_0/source/lib/cmdline/popt_common.c
   branches/SAMBA_4_0/source/lib/cmdline/popt_common.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/cmdline/popt_common.c
===================================================================
--- branches/SAMBA_4_0/source/lib/cmdline/popt_common.c	2004-10-20 23:27:09 UTC (rev 3099)
+++ branches/SAMBA_4_0/source/lib/cmdline/popt_common.c	2004-10-21 00:26:43 UTC (rev 3100)
@@ -304,6 +304,7 @@
 			if ((p = strchr_m(tmp,'\\'))) {
 				*p = 0;
 				pstrcpy(cmdline_auth_info.domain,tmp);
+				cmdline_auth_info.got_domain = True;
 				pstrcpy(cmdline_auth_info.username,p+1);
 			}
 
@@ -317,6 +318,7 @@
 
 		if (getenv("DOMAIN")) {
 			pstrcpy(cmdline_auth_info.domain,getenv("DOMAIN"));
+			cmdline_auth_info.got_domain = True;
 		}
 
 		if (getenv("PASSWD")) {
@@ -344,6 +346,7 @@
 			if ((p = strchr_m(tmp,'\\'))) {
 				*p = 0;
 				pstrcpy(cmdline_auth_info.domain,tmp);
+				cmdline_auth_info.got_domain = True;
 				pstrcpy(cmdline_auth_info.username,p+1);
 			}
 
@@ -431,12 +434,13 @@
 
 void cmdline_set_userdomain(const char *domain)
 {
+	cmdline_auth_info.got_domain = True;
 	pstrcpy(cmdline_auth_info.domain, domain);
 }
 
 const char *cmdline_get_userdomain(void)
 {
-	if (cmdline_auth_info.domain[0]) {
+	if (cmdline_auth_info.got_domain) {
 		return cmdline_auth_info.domain;
 	}
 

Modified: branches/SAMBA_4_0/source/lib/cmdline/popt_common.h
===================================================================
--- branches/SAMBA_4_0/source/lib/cmdline/popt_common.h	2004-10-20 23:27:09 UTC (rev 3099)
+++ branches/SAMBA_4_0/source/lib/cmdline/popt_common.h	2004-10-21 00:26:43 UTC (rev 3100)
@@ -40,8 +40,9 @@
 
 struct cmdline_auth_info {
 	pstring username;
+	pstring domain;
+	BOOL got_domain;
 	pstring password;
-	pstring domain;
 	BOOL got_pass;
 	BOOL use_kerberos;
 };



More information about the samba-cvs mailing list