From 38369ba74190259b437e9a875ac75a33d3ff3c24 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 28 Dec 2007 00:02:13 -0800 Subject: Ensure we turn off POSIX large read/write if encryption is mandatory or signing is on. Jeremy. (This used to be commit 5088b704791be2f36641fa0ec59dff7f289ae868) --- source3/smbd/trans2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3') 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; -- cgit