summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-10-11 01:17:41 +0000
committerJeremy Allison <jra@samba.org>2002-10-11 01:17:41 +0000
commit24d8333c72fb7699542d8ae1625ad4862af3aa07 (patch)
treedc2ec0b701a4f6ddbf23f5b007ba9ae863c3cf10 /source3/smbd
parentac71311ff2f74d602c14c24c0b03d6ef3e81afd1 (diff)
downloadsamba-24d8333c72fb7699542d8ae1625ad4862af3aa07.tar.gz
samba-24d8333c72fb7699542d8ae1625ad4862af3aa07.tar.bz2
samba-24d8333c72fb7699542d8ae1625ad4862af3aa07.zip
Turns out with Win9x, we could occasionally return from unix_convert() given
a mangled name without a valid stat struct if the file existed. This would then cause open_file_shared1() to erroneously think the file open was new, thus not check for oplock break, thus causing a spurious EAGAIN reply to the open on a file we already had kernel oplocked.... (phew - that was fun to track down :-). Jeremy. (This used to be commit e23210e4732163e7f005b320235c20c814b41972)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/filename.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index d343db26f6..202bd75d4c 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -318,6 +318,18 @@ BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_componen
pstrcat(start,"/");
pstrcat(start,rest);
*end = '\0';
+ } else {
+ /*
+ * We just scanned for, and found the end of the path.
+ * We must return a valid stat struct if it exists.
+ * JRA.
+ */
+
+ if (vfs_stat(conn,name, &st) == 0) {
+ *pst = st;
+ } else {
+ ZERO_STRUCT(st);
+ }
}
} /* end else */