svn commit: samba r6022 - in branches/SAMBA_3_0/source: lib smbd

jra at samba.org jra at samba.org
Thu Mar 24 02:23:32 GMT 2005


Author: jra
Date: 2005-03-24 02:23:32 +0000 (Thu, 24 Mar 2005)
New Revision: 6022

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

Log:
Fix for bug #2533. Incorrect dir listings from OS/2 clients.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/lib/util.c
   branches/SAMBA_3_0/source/smbd/dir.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/util.c
===================================================================
--- branches/SAMBA_3_0/source/lib/util.c	2005-03-24 01:02:55 UTC (rev 6021)
+++ branches/SAMBA_3_0/source/lib/util.c	2005-03-24 02:23:32 UTC (rev 6022)
@@ -641,7 +641,9 @@
 	put_dos_date(buf,22,date);
 	SSVAL(buf,26,size & 0xFFFF);
 	SSVAL(buf,28,(size >> 16)&0xFFFF);
-	push_ascii(buf+30,fname,12,0);
+	/* We only uppercase if the protocol is downrev.
+	   Strange, but verified on W2K3. Needed for OS/2. JRA. */
+	push_ascii(buf+30,fname,12,Protocol < PROTOCOL_NT1 ? STR_UPPER : 0);
 	DEBUG(8,("put name [%s] from [%s] into dir struct\n",buf+30, fname));
 }
 

Modified: branches/SAMBA_3_0/source/smbd/dir.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/dir.c	2005-03-24 01:02:55 UTC (rev 6021)
+++ branches/SAMBA_3_0/source/smbd/dir.c	2005-03-24 02:23:32 UTC (rev 6022)
@@ -713,16 +713,11 @@
 	SMB_STRUCT_STAT sbuf;
 	pstring path;
 	pstring pathreal;
-	BOOL isrootdir;
 	pstring filename;
 	BOOL needslash;
 
 	*path = *pathreal = *filename = 0;
 
-	isrootdir = (strequal(conn->dirpath,"./") ||
-			strequal(conn->dirpath,".") ||
-			strequal(conn->dirpath,"/"));
-  
 	needslash = ( conn->dirpath[strlen(conn->dirpath) -1] != '/');
 
 	if (!conn->dirptr)
@@ -747,8 +742,6 @@
 		if ((strcmp(mask,"*.*") == 0) ||
 		    mask_match(filename,mask,False) ||
 		    mangle_mask_match(conn,filename,mask)) {
-			if (isrootdir && (strequal(filename,"..") || strequal(filename,".")))
-				continue;
 
 			if (!mangle_is_8_3(filename, False))
 				mangle_map(filename,True,False,SNUM(conn));



More information about the samba-cvs mailing list