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

tridge at samba.org tridge at samba.org
Tue Oct 12 05:07:34 GMT 2004


Author: tridge
Date: 2004-10-12 05:07:33 +0000 (Tue, 12 Oct 2004)
New Revision: 2926

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

Log:
name->dos.attrib is not valid unless name->exists is true





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-12 05:06:40 UTC (rev 2925)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c	2004-10-12 05:07:33 UTC (rev 2926)
@@ -110,12 +110,14 @@
 #define O_DIRECTORY 0
 #endif
 
-	if ((io->generic.in.create_options & NTCREATEX_OPTIONS_DIRECTORY) &&
+	if (name->exists &&
+	    (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) {
+	if ((name->exists && name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) ||
+	    (io->generic.in.create_options & NTCREATEX_OPTIONS_DIRECTORY)) {
 		flags = O_RDONLY | O_DIRECTORY;
 		if (pvfs->flags & PVFS_FLAG_READONLY) {
 			goto do_open;



More information about the samba-cvs mailing list