summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-10-11 01:19:00 +0000
committerJeremy Allison <jra@samba.org>2002-10-11 01:19:00 +0000
commitd0a99a261d31f39c2d30a067d3d7efb80282a15a (patch)
tree036341d15d52e42b788eeea7075658bf79956a0e /source3/smbd
parentbb2dc1a6339c567f1802f5fa33e593bd7f73fbd3 (diff)
downloadsamba-d0a99a261d31f39c2d30a067d3d7efb80282a15a.tar.gz
samba-d0a99a261d31f39c2d30a067d3d7efb80282a15a.tar.bz2
samba-d0a99a261d31f39c2d30a067d3d7efb80282a15a.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 af80b033a5374da9163e3484f7d8707813490597)
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 */