--- a/source/libsmb/cliconnect.c 2011-07-24 21:09:38.000000000 +0200 +++ b/source/libsmb/cliconnect.c 2016-04-14 18:13:15.000000000 +0200 @@ -1058,6 +1058,16 @@ } } else { NTSTATUS status; + + if (lp_use_spnego()) { + /* + * Don't send an NTLMv2 response without NTLMSSP + * if we want to use spnego support + */ + DEBUG(1, ("Server does not support EXTENDED_SECURITY " + "but spnego is turned on\n")); + return NT_STATUS_ACCESS_DENIED; + } /* otherwise do a NT1 style session setup */ status = cli_session_setup_nt1(cli, user, pass, passlen,