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

metze at samba.org metze at samba.org
Tue Apr 26 07:10:43 GMT 2005


Author: metze
Date: 2005-04-26 07:10:43 +0000 (Tue, 26 Apr 2005)
New Revision: 6483

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

Log:
fix anonymous connections, '-U %' or '-U ""%""' can be used for this

metze
Modified:
   branches/SAMBA_4_0/source/lib/cmdline/popt_common.c
   branches/SAMBA_4_0/source/lib/credentials.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/cmdline/popt_common.c
===================================================================
--- branches/SAMBA_4_0/source/lib/cmdline/popt_common.c	2005-04-26 05:19:22 UTC (rev 6482)
+++ branches/SAMBA_4_0/source/lib/cmdline/popt_common.c	2005-04-26 07:10:43 UTC (rev 6483)
@@ -197,7 +197,7 @@
 
 			cli_credentials_parse_string(cmdline_credentials, arg, CRED_SPECIFIED);
 
-			if ((lp=strchr_m(arg,'%'))) {
+			if (cmdline_credentials->password && (lp=strchr_m(arg,'%'))) {
 				memset(lp,0,strlen(cmdline_credentials->password));
 			}
 		}

Modified: branches/SAMBA_4_0/source/lib/credentials.c
===================================================================
--- branches/SAMBA_4_0/source/lib/credentials.c	2005-04-26 05:19:22 UTC (rev 6482)
+++ branches/SAMBA_4_0/source/lib/credentials.c	2005-04-26 07:10:43 UTC (rev 6483)
@@ -363,6 +363,11 @@
 {
 	char *uname, *p;
 
+	if (strcmp("%",data) == 0) {
+		cli_credentials_set_anonymous(credentials);
+		return;
+	}
+
 	uname = talloc_strdup(credentials, data); 
 	if ((p = strchr_m(uname,'%'))) {
 		*p = 0;



More information about the samba-cvs mailing list