diff options
author | Jeremy Allison <jra@samba.org> | 2000-12-08 00:39:32 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-12-08 00:39:32 +0000 |
commit | 7055fa0bc43f6e2b3f04b8901fccea80d59bf490 (patch) | |
tree | c4ffe9561d4962ec0d453464a014bff8dc004629 /source | |
parent | e9f48c9cec960b6190fb7a2485c9476640863071 (diff) | |
download | samba-7055fa0bc43f6e2b3f04b8901fccea80d59bf490.tar.gz samba-7055fa0bc43f6e2b3f04b8901fccea80d59bf490.tar.xz samba-7055fa0bc43f6e2b3f04b8901fccea80d59bf490.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.
Diffstat (limited to 'source')
-rw-r--r-- | source/smbd/filename.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/smbd/filename.c b/source/smbd/filename.c index 5fe4a4c9038..aedd2e820f4 100644 --- a/source/smbd/filename.c +++ b/source/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; /* |