git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ed1464
)
Check fstat return for error.
author
Jeremy Allison
<jra@samba.org>
Fri, 12 May 2000 00:11:49 +0000
(
00:11
+0000)
committer
Jeremy Allison
<jra@samba.org>
Fri, 12 May 2000 00:11:49 +0000
(
00:11
+0000)
Jeremy.
source/smbd/open.c
patch
|
blob
|
history
diff --git
a/source/smbd/open.c
b/source/smbd/open.c
index e501d9ded8eb9f5bd6f440c40276a786f361cc6b..23d95eadfd2bf5cfa0f1d208bfe4e15af7e7b2d6 100644
(file)
--- a/
source/smbd/open.c
+++ b/
source/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