summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-11-21 12:14:53 -0800
committerJeremy Allison <jra@samba.org>2008-11-21 12:14:53 -0800
commit97fb05c2c0d0b08f3ed5aa7358a4d6d8c1725012 (patch)
treeab3142c02ae83f60cd92f2717d567f36612d918c /source3/smbd/reply.c
parent9164b14a9fb1fee9ddec275032bb911d34b683d5 (diff)
downloadsamba-97fb05c2c0d0b08f3ed5aa7358a4d6d8c1725012.tar.gz
samba-97fb05c2c0d0b08f3ed5aa7358a4d6d8c1725012.tar.bz2
samba-97fb05c2c0d0b08f3ed5aa7358a4d6d8c1725012.zip
First part of fix for bug #5903 - vfs_streams_xattr breaks contents of the file.
Restructures parts of open code so that fsp must be allocated before calling open_file_ntcreate(_internal). Also fix up file ref-counting inside files.c. Jeremy.
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index c363ed5609..1f99db2de4 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -4558,8 +4558,15 @@ void reply_printopen(struct smb_request *req)
return;
}
+ status = file_new(req, conn, &fsp);
+ if(!NT_STATUS_IS_OK(status)) {
+ reply_nterror(req, status);
+ END_PROFILE(SMBsplopen);
+ return;
+ }
+
/* Open for exclusive use, write only. */
- status = print_fsp_open(req, conn, NULL, req->vuid, &fsp);
+ status = print_fsp_open(req, conn, NULL, req->vuid, fsp);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);