summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-04-03 13:57:11 +0200
committerVolker Lendecke <vlendec@samba.org>2011-04-03 14:54:27 +0200
commit2b94169cda00e31a3b7814996abf42635735b6ff (patch)
tree82bb7ae6eb99d32308137b5a2e6d232fa857f40e
parent76f7c2a2541259156f08626f73cb63b6044e4e34 (diff)
downloadsamba-2b94169cda00e31a3b7814996abf42635735b6ff.tar.gz
samba-2b94169cda00e31a3b7814996abf42635735b6ff.tar.bz2
samba-2b94169cda00e31a3b7814996abf42635735b6ff.zip
s3: Fix bug 8042: File creation on OS/X
With a case insensitive file system the stat cache lookup leaked the parent directorys stat information from unix_convert into the smb_filename. This led open_file_ntcreate to believe it just created a directory. In the case where we do the search we already invalidate the stat struct. Thanks to TAKAHASHI Motonobu for insisting! :-) Volker Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Apr 3 14:54:27 CEST 2011 on sn-devel-104
-rw-r--r--source3/smbd/filename.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 0fda8879da..912e3a41f3 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -506,6 +506,9 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
}
}
+ /* Stat failed - ensure we don't use it. */
+ SET_STAT_INVALID(smb_fname->st);
+
/*
* Missing last component is ok - new file.
* Also deal with permission denied elsewhere.