summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-07-11 16:35:32 -0700
committerJeremy Allison <jra@samba.org>2012-07-12 22:46:07 +0200
commit775014bd9cc8717ad5bb2651ca1078833d149610 (patch)
treefacec532e8cfc0c5bb6dd653cddc8a02f9c36933
parentcb405947caa9f4bdb962483860a9093a364ecbf2 (diff)
downloadsamba-775014bd9cc8717ad5bb2651ca1078833d149610.tar.gz
samba-775014bd9cc8717ad5bb2651ca1078833d149610.tar.bz2
samba-775014bd9cc8717ad5bb2651ca1078833d149610.zip
Make sure we reset fsp->initial_allocation_size to zero if we didn't create the file.
This will become important as we set fsp->initial_allocation_size before create.
-rw-r--r--source3/smbd/open.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 0f4a588999..b5d8466e7e 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -3727,6 +3727,8 @@ static NTSTATUS create_file_unixpath(connection_struct *conn,
fsp->initial_allocation_size = smb_roundup(
fsp->conn, (uint64_t)fsp->fsp_name->st.st_ex_size);
}
+ } else {
+ fsp->initial_allocation_size = 0;
}
if ((info == FILE_WAS_CREATED) && lp_nt_acl_support(SNUM(conn)) &&