From b041dc9451e210acc82a82b75e02e4166d8973d5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Mar 2013 09:03:38 +0100 Subject: [PATCH] s3:libsmb: make use of SMB_CAP_LEGACY_CLIENT_MASK instead of SMB_CAP_CLIENT_MASK This should allow smbclient to keep using large reads against older Samba versions (<= 3.6.x) and other servers that may also require this. Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- source3/libsmb/cliconnect.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 52d8e0cf8cf..872900c6f3a 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -341,9 +341,13 @@ static uint32_t cli_session_setup_capabilities(struct cli_state *cli, * - client only flags * - flags used in both directions * - * We do not echo the server only flags. + * We do not echo the server only flags, except some legacy flags. + * + * SMB_CAP_LEGACY_CLIENT_MASK contains CAP_LARGE_READX and + * CAP_LARGE_WRITEX in order to allow us to do large reads + * against old Samba releases (<= 3.6.x). */ - client_capabilities &= (SMB_CAP_BOTH_MASK | SMB_CAP_CLIENT_MASK); + client_capabilities &= (SMB_CAP_BOTH_MASK | SMB_CAP_LEGACY_CLIENT_MASK); /* * Session Setup specific flags CAP_DYNAMIC_REAUTH -- 2.11.4.GIT