From 269acfe1d2e1776ca5afdc4d4ead20db0b88cacd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 8 Dec 2000 00:39:32 +0000 Subject: 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) --- source3/smbd/filename.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3') 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; /* -- cgit