From 4547fde9f5a2ab1445ad273b53a83cdaccb23be4 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 23 Apr 2002 18:50:10 +0000 Subject: When doing a non-io open the stat failing is no cause for a debug zero to be printed, it just means file not found. Jeremy. (This used to be commit 25dea499b82da5e84412bf10781adbd240aa46f0) --- source3/smbd/open.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index f8ba1ca8d8..4d49b2cb59 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -169,11 +169,15 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn, if (fsp->fd == -1) ret = vfs_stat(conn, fname, psbuf); - else + else { ret = vfs_fstat(fsp,fsp->fd,psbuf); + /* If we have an fd, this stat should succeed. */ + if (ret == -1) + DEBUG(0,("Error doing fstat on open file %s (%s)\n", fname,strerror(errno) )); + } + /* For a non-io open, this stat failing means file not found. JRA */ if (ret == -1) { - DEBUG(0,("Error doing fstat on open file %s (%s)\n", fname,strerror(errno) )); fd_close(conn, fsp); return False; } -- cgit