summaryrefslogtreecommitdiff
path: root/source3/smbd/nttrans.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-09-25 22:18:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:48 -0500
commit761dfdabfa306dd8044761b294c5a5f957f5119e (patch)
tree8ffbc3dd53b720dbf02f881d4bd026425a6a2bf4 /source3/smbd/nttrans.c
parenta9a4f22958a872ccb92596679787ba9afdbbb5af (diff)
downloadsamba-761dfdabfa306dd8044761b294c5a5f957f5119e.tar.gz
samba-761dfdabfa306dd8044761b294c5a5f957f5119e.tar.bz2
samba-761dfdabfa306dd8044761b294c5a5f957f5119e.zip
r2637: Fix the roundup problem (returning 1mb roundup) for non-Windows
clients. This upsets the smb client in the Linux kernel (and Linus :-). Jeremy. (This used to be commit dad699ce0b36d23b80fe70b74d5e98df568a0495)
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r--source3/smbd/nttrans.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index d9e321fd96..eaaf68d689 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -907,7 +907,7 @@ create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attrib
allocation_size |= (((SMB_BIG_UINT)IVAL(inbuf,smb_ntcreate_AllocationSize + 4)) << 32);
#endif
if (allocation_size && (allocation_size > (SMB_BIG_UINT)file_len)) {
- fsp->initial_allocation_size = SMB_ROUNDUP(allocation_size,SMB_ROUNDUP_ALLOCATION_SIZE);
+ fsp->initial_allocation_size = smb_roundup(allocation_size);
if (fsp->is_directory) {
close_file(fsp,False);
END_PROFILE(SMBntcreateX);
@@ -920,7 +920,7 @@ create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attrib
return ERROR_NT(NT_STATUS_DISK_FULL);
}
} else {
- fsp->initial_allocation_size = SMB_ROUNDUP(((SMB_BIG_UINT)file_len),SMB_ROUNDUP_ALLOCATION_SIZE);
+ fsp->initial_allocation_size = smb_roundup((SMB_BIG_UINT)file_len);
}
/*
@@ -1429,7 +1429,7 @@ static int call_nt_transact_create(connection_struct *conn, char *inbuf, char *o
allocation_size |= (((SMB_BIG_UINT)IVAL(params,16)) << 32);
#endif
if (allocation_size && (allocation_size > file_len)) {
- fsp->initial_allocation_size = SMB_ROUNDUP(allocation_size,SMB_ROUNDUP_ALLOCATION_SIZE);
+ fsp->initial_allocation_size = smb_roundup(allocation_size);
if (fsp->is_directory) {
close_file(fsp,False);
END_PROFILE(SMBntcreateX);
@@ -1441,7 +1441,7 @@ static int call_nt_transact_create(connection_struct *conn, char *inbuf, char *o
return ERROR_NT(NT_STATUS_DISK_FULL);
}
} else {
- fsp->initial_allocation_size = SMB_ROUNDUP(((SMB_BIG_UINT)file_len),SMB_ROUNDUP_ALLOCATION_SIZE);
+ fsp->initial_allocation_size = smb_roundup((SMB_BIG_UINT)file_len);
}
/* Realloc the size of parameters and data we will return */