summaryrefslogtreecommitdiffstats
path: root/source/smbd/trans2.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-28 00:02:13 -0800
committerJeremy Allison <jra@samba.org>2007-12-28 00:02:13 -0800
commit5088b704791be2f36641fa0ec59dff7f289ae868 (patch)
tree38048237e95317b9e43fe1bab124b8722861682e /source/smbd/trans2.c
parentd241bfa57729bb934ada6beabf842a2ca7b4f8a2 (diff)
downloadsamba-5088b704791be2f36641fa0ec59dff7f289ae868.tar.gz
samba-5088b704791be2f36641fa0ec59dff7f289ae868.tar.xz
samba-5088b704791be2f36641fa0ec59dff7f289ae868.zip
Ensure we turn off POSIX large read/write if encryption
is mandatory or signing is on. Jeremy.
Diffstat (limited to 'source/smbd/trans2.c')
-rw-r--r--source/smbd/trans2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index 7625eaed7df..b1f57a9b3ec 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -2739,6 +2739,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
{
bool large_write = lp_min_receive_file_size() &&
!srv_is_signing_active();
+ bool large_read = !srv_is_signing_active();
int encrypt_caps = 0;
if (!lp_unix_extensions()) {
@@ -2757,6 +2758,8 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
case Required:
encrypt_caps = CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP|
CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP;
+ large_write = false;
+ large_read = false;
break;
}
@@ -2773,8 +2776,8 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
CIFS_UNIX_FCNTL_LOCKS_CAP|
CIFS_UNIX_EXTATTR_CAP|
CIFS_UNIX_POSIX_PATH_OPERATIONS_CAP|
- CIFS_UNIX_LARGE_READ_CAP|
encrypt_caps|
+ (large_read ? CIFS_UNIX_LARGE_READ_CAP : 0) |
(large_write ?
CIFS_UNIX_LARGE_WRITE_CAP : 0))));
break;