1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

Check fstat return for error.

Jeremy.
This commit is contained in:
Jeremy Allison -
parent 1ed146467e
commit c54e77b1f9

View File

@ -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