summaryrefslogtreecommitdiff
path: root/source3/smbd
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
commit38369ba74190259b437e9a875ac75a33d3ff3c24 (patch)
treee70c92bda9d55c33afc15bd0a1bebb7c94b85149 /source3/smbd
parentafce2b245a8ff137a4ecea547c3cfb65ab58dc15 (diff)
downloadsamba-38369ba74190259b437e9a875ac75a33d3ff3c24.tar.gz
samba-38369ba74190259b437e9a875ac75a33d3ff3c24.tar.bz2
samba-38369ba74190259b437e9a875ac75a33d3ff3c24.zip
Ensure we turn off POSIX large read/write if encryption
is mandatory or signing is on. Jeremy. (This used to be commit 5088b704791be2f36641fa0ec59dff7f289ae868)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/trans2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 7625eaed7d..b1f57a9b3e 100644
--- a/source3/smbd/trans2.c
+++ b/source3/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;