summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-05-12 00:11:49 +0000
committerJeremy Allison <jra@samba.org>2000-05-12 00:11:49 +0000
commit28d8970987265275f53ba1898b0057cf20629c9c (patch)
tree3fdeff061cf640df341c2a57c9d5fae37faf4227 /source3
parent612738a9e14b6fb6a2687993d6416bbe6c3ea94d (diff)
downloadsamba-28d8970987265275f53ba1898b0057cf20629c9c.tar.gz
samba-28d8970987265275f53ba1898b0057cf20629c9c.tar.bz2
samba-28d8970987265275f53ba1898b0057cf20629c9c.zip
Check fstat return for error.
Jeremy. (This used to be commit c54e77b1f9defce3d6c2e530e0fb460c2b0c54c2)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/open.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index e501d9ded8..23d95eadfd 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -133,7 +133,11 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn,
return False;
}
- conn->vfs_ops.fstat(fsp->fd, &sbuf);
+ if (conn->vfs_ops.fstat(fsp->fd, &sbuf) == -1) {
+ DEBUG(0,("Error doing fstat on open file %s (%s)\n", fname,strerror(errno) ));
+ fd_close(conn, fsp);
+ return False;
+ }
/*
* POSIX allows read-only opens of directories. We don't