summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-12-08 00:39:32 +0000
committerJeremy Allison <jra@samba.org>2000-12-08 00:39:32 +0000
commit269acfe1d2e1776ca5afdc4d4ead20db0b88cacd (patch)
tree99cf45ca02524891d7599658ba0aac242b56e2ba
parentbe7e02f9bcbce31bcc4b69c54fe0630ee83c7cd1 (diff)
downloadsamba-269acfe1d2e1776ca5afdc4d4ead20db0b88cacd.tar.gz
samba-269acfe1d2e1776ca5afdc4d4ead20db0b88cacd.tar.bz2
samba-269acfe1d2e1776ca5afdc4d4ead20db0b88cacd.zip
Fixed *very* subtle statcache bug where invalid stat state could be
being used if last component lookup failed, but was found in the directory scan. Jeremy. (This used to be commit 7055fa0bc43f6e2b3f04b8901fccea80d59bf490)
-rw-r--r--source3/smbd/filename.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 5fe4a4c903..aedd2e820f 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -278,7 +278,6 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component,
* Check if the name exists up to this point.
*/
- ZERO_STRUCT(st);
if (vfs_stat(conn,name, &st) == 0) {
/*
* It exists. it must either be a directory or this must be
@@ -296,6 +295,8 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component,
} else {
pstring rest;
+ /* Stat failed - ensure we don't use it. */
+ ZERO_STRUCT(st);
*rest = 0;
/*