[PATCH] non-ascii share names in smbclient-2.2

Ihar Viarheichyk i.viarheichyk at sam-solutions.net
Thu Nov 8 02:26:02 GMT 2001


Hello.

I posted this patch some time ago, but seems it was lost somewhere.

smbclient and smbmount in Samba-2.2 branch have small error in handling
share name. Share names which contain non-ascii characters are not
accessible.

Here is a patch which fixes it.

-- 
Igor Vergeichik
ICQ 47298730

-------------- next part --------------
--- samba-2.2.orig/source/libsmb/cliconnect.c	Fri Oct 26 11:18:49 2001
+++ samba-2.2/source/libsmb/cliconnect.c	Tue Oct 30 15:54:46 2001
@@ -263,8 +263,6 @@
 
 	slprintf(fullshare, sizeof(fullshare)-1,
 		 "\\\\%s\\%s", cli->desthost, share);
-	unix_to_dos(fullshare, True);
-	strupper(fullshare);
 
 	set_message(cli->outbuf,4, 0, True);
 	CVAL(cli->outbuf,smb_com) = SMBtconX;
@@ -276,7 +274,7 @@
 	p = smb_buf(cli->outbuf);
 	memcpy(p,pword,passlen);
 	p += passlen;
-	p += clistr_push(cli, p, fullshare, -1, STR_CONVERT | STR_TERMINATE);
+	p += clistr_push(cli, p, fullshare, -1, STR_CONVERT | STR_UPPER | STR_TERMINATE);
 	fstrcpy(p, dev); p += strlen(dev)+1;
 
 	cli_setup_bcc(cli, p);


More information about the samba-technical mailing list