diff options
author | Jeremy Allison <jra@samba.org> | 2002-10-11 01:19:00 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-10-11 01:19:00 +0000 |
commit | af80b033a5374da9163e3484f7d8707813490597 (patch) | |
tree | 914c9a5505fe605ad79ab0a0fe0ec58065b398be /source/smbd/filename.c | |
parent | 7634a58ec83ed7b40fe8ac95b0486b1ac00c59e4 (diff) | |
download | samba-af80b033a5374da9163e3484f7d8707813490597.tar.gz samba-af80b033a5374da9163e3484f7d8707813490597.tar.xz samba-af80b033a5374da9163e3484f7d8707813490597.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.
Diffstat (limited to 'source/smbd/filename.c')
-rw-r--r-- | source/smbd/filename.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/smbd/filename.c b/source/smbd/filename.c index d343db26f6b..202bd75d4c8 100644 --- a/source/smbd/filename.c +++ b/source/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 */ |