summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-04-23 18:50:10 +0000
committerJeremy Allison <jra@samba.org>2002-04-23 18:50:10 +0000
commit4547fde9f5a2ab1445ad273b53a83cdaccb23be4 (patch)
tree431e3c26cb79b47c93e3d6876b96c73ae169521e /source3/smbd/open.c
parentfd99accdb55ea7e6be8f61155efad88c9d5edaf6 (diff)
downloadsamba-4547fde9f5a2ab1445ad273b53a83cdaccb23be4.tar.gz
samba-4547fde9f5a2ab1445ad273b53a83cdaccb23be4.tar.bz2
samba-4547fde9f5a2ab1445ad273b53a83cdaccb23be4.zip
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)
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r--source3/smbd/open.c8
1 files 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;
}