summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-10-20 23:59:47 +0000
committerJeremy Allison <jra@samba.org>2000-10-20 23:59:47 +0000
commit979aa01e011d433328af0ead7644f47d0cfadf13 (patch)
tree6ad08e48b0c2f7ae1b0129ca8f5cb92dd32f9227
parent6d39df7cf84d391bb4dd55d9a26f9f5a6368f46f (diff)
downloadsamba-979aa01e011d433328af0ead7644f47d0cfadf13.tar.gz
Fix for vfs_fstat() crash with new stat code.
Jeremy.
-rw-r--r--source/smbd/open.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/smbd/open.c b/source/smbd/open.c
index 12f6d129484..258e463ecf3 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -548,6 +548,7 @@ files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_S
return NULL;
fsp->fd = -1;
+ fsp->conn = conn; /* The vfs_fXXX() macros need this. */
DEBUG(10,("open_file_shared: fname = %s, share_mode = %x, ofun = %x, mode = %o, oplock request = %d\n",
fname, share_mode, ofun, (int)mode, oplock_request ));
@@ -868,6 +869,8 @@ files_struct *open_directory(connection_struct *conn, char *fname,
if(!fsp)
return NULL;
+ fsp->conn = conn; /* THe vfs_fXXX() macros need this. */
+
if (VALID_STAT(*psbuf))
got_stat = True;