From d0a99a261d31f39c2d30a067d3d7efb80282a15a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 11 Oct 2002 01:19:00 +0000 Subject: 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) --- source3/smbd/filename.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source3/smbd/filename.c') 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 */ -- cgit