From: Stefan Metzmacher Date: Mon, 19 Jun 2017 06:16:57 +0000 (+0200) Subject: s3:libsmb: add CLI_FULL_CONNECTION_FORCE_SMB1 X-Git-Tag: tevent-0.9.32~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a05b0b169fcc2de10e31a17c9ad3cc55cb01445;p=thirdparty%2Fsamba.git s3:libsmb: add CLI_FULL_CONNECTION_FORCE_SMB1 Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source3/include/client.h b/source3/include/client.h index 38fba01142d..b716a55f709 100644 --- a/source3/include/client.h +++ b/source3/include/client.h @@ -125,5 +125,6 @@ struct file_info { #define CLI_FULL_CONNECTION_FORCE_DOS_ERRORS 0x0080 #define CLI_FULL_CONNECTION_FORCE_ASCII 0x0100 #define CLI_FULL_CONNECTION_USE_NT_HASH 0x0200 +#define CLI_FULL_CONNECTION_FORCE_SMB1 0x0400 #endif /* _CLIENT_H */ diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index e01253f4504..b1b7e263e58 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -2780,6 +2780,10 @@ static struct tevent_req *cli_start_connection_send( state->max_protocol = lp_client_max_protocol(); } + if (flags & CLI_FULL_CONNECTION_FORCE_SMB1) { + state->max_protocol = MIN(state->max_protocol, PROTOCOL_NT1); + } + subreq = cli_connect_nb_send(state, ev, dest_host, dest_ss, port, 0x20, my_name, signing_state, flags); if (tevent_req_nomem(subreq, req)) {