summaryrefslogtreecommitdiff
path: root/source3/libsmb/clireadwrite.c
diff options
context:
space:
mode:
authorGerald (Jerry) Carter <jerry@samba.org>2008-01-15 07:59:23 -0600
committerGerald (Jerry) Carter <jerry@samba.org>2008-01-15 07:59:23 -0600
commit7ff128ef03ed03e6b9ce17642cda793255f17c0e (patch)
treea6b2202fffd22ebb24546998f4c3c0efd7fecac1 /source3/libsmb/clireadwrite.c
parentf0edf72d87ca300058c3ae7f464f26b9a2cce651 (diff)
parentab10557a68aae9d8065966129dee751e69880ad1 (diff)
downloadsamba-7ff128ef03ed03e6b9ce17642cda793255f17c0e.tar.gz
samba-7ff128ef03ed03e6b9ce17642cda793255f17c0e.tar.bz2
samba-7ff128ef03ed03e6b9ce17642cda793255f17c0e.zip
Merge commit 'samba/v3-2-test' into v3-2-stable
(This used to be commit 061c90fefef0e6093dfc3912d381cc306549ed4b)
Diffstat (limited to 'source3/libsmb/clireadwrite.c')
-rw-r--r--source3/libsmb/clireadwrite.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 0b33e43563..6b39a885f0 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -404,6 +404,9 @@ ssize_t cli_write(struct cli_state *cli,
mpx = 1;
}
+ /* Default (small) writesize. */
+ writesize = (cli->max_xmit - (smb_size+32)) & ~1023;
+
if (write_mode == 0 &&
!client_is_signing_on(cli) &&
!cli_encryption_on(cli) &&
@@ -415,11 +418,11 @@ ssize_t cli_write(struct cli_state *cli,
} else if (cli->capabilities & CAP_LARGE_WRITEX) {
if (cli->is_samba) {
writesize = CLI_SAMBA_MAX_LARGE_WRITEX_SIZE;
- } else {
+ } else if (!client_is_signing_on(cli)) {
+ /* Windows restricts signed writes to max_xmit.
+ * Found by Volker. */
writesize = CLI_WINDOWS_MAX_LARGE_WRITEX_SIZE;
}
- } else {
- writesize = (cli->max_xmit - (smb_size+32)) & ~1023;
}
blocks = (size + (writesize-1)) / writesize;