svn commit: samba r2916 - in branches/SAMBA_4_0/source/ntvfs/posix: .

tridge at samba.org tridge at samba.org
Mon Oct 11 14:35:54 GMT 2004


Author: tridge
Date: 2004-10-11 14:35:54 +0000 (Mon, 11 Oct 2004)
New Revision: 2916

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/ntvfs/posix&rev=2916&nolog=1

Log:
longhorn client doesn't bother setting the directory bit in ntcreatex
when opening directories. This change allows samba4 server to work
with longhorn client.


Modified:
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c	2004-10-11 14:15:25 UTC (rev 2915)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c	2004-10-11 14:35:54 UTC (rev 2916)
@@ -110,7 +110,12 @@
 #define O_DIRECTORY 0
 #endif
 
-	if (io->generic.in.create_options & NTCREATEX_OPTIONS_DIRECTORY) {
+	if ((io->generic.in.create_options & NTCREATEX_OPTIONS_DIRECTORY) &&
+	    !(name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY)) {
+		return NT_STATUS_NOT_A_DIRECTORY;
+	}
+
+	if (name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) {
 		flags = O_RDONLY | O_DIRECTORY;
 		if (pvfs->flags & PVFS_FLAG_READONLY) {
 			goto do_open;



More information about the samba-cvs mailing list