reassign 511744 libsmbclient
found 511744 2:3.2.5-1
tags 511744 patch
thanks

On Thu, Jan 15, 2009 at 02:21:48PM +1100, Tim Richardson wrote:
> This was generated while 
> * I connected to the share using Nautilus graphical tools (open the
> Windows workgroup, open the computer name icon and then open the share),
> * created two text files, 
> * added some content to differentiate them
> * reproduced the bug by renaming (described earlier in the bug report),
> clobbering one of the files.

Thanks, this shows (in the NegProt request) that the client is correctly
requesting the "Samba" dialect, which should be enough to trigger case
sensitivity *if* the client requests it.

However, a look at the SMB header shows that the 'case insensitive' flag,
FLAG_CASELESS_PATHNAMES, is being set by the client; so the client is
deliberately *not* negotiating case-sensitive filenames.

This is a libsmbclient bug.  Samba client connections are case-insensitive
by default; libsmbclient, as a library intended to present a POSIX-like
interface to applications, should override this default, but doesn't.

The attached patch should address this, but I want to get this approved by
upstream first before applying it in Debian.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
Index: source/libsmb/libsmb_server.c
===================================================================
--- source/libsmb/libsmb_server.c	(revision 2336)
+++ source/libsmb/libsmb_server.c	(working copy)
@@ -355,7 +355,10 @@
 		errno = ENOMEM;
 		return NULL;
 	}
-        
+
+	/* POSIX-like - always request case-sensitivity by default. */        
+	cli_set_case_sensitive(cli, True);
+
         if (smbc_getOptionUseKerberos(context)) {
 		c->use_kerberos = True;
 	}

Reply via email to