#include "includes.h"
#include "smbd/globals.h"
+#include "../libcli/auth/spnego.h"
extern fstring remote_proto;
-extern enum protocol_types Protocol;
static void get_challenge(uint8 buff[8])
{
reply_outbuf(req, 1, 0);
SSVAL(req->outbuf, smb_vwv0, choice);
- Protocol = PROTOCOL_CORE;
+ set_Protocol(PROTOCOL_CORE);
}
/****************************************************************************
SCVAL(req->outbuf,smb_flg,FLAG_REPLY|FLAG_SUPPORT_LOCKREAD);
SSVAL(req->outbuf,smb_vwv1,0x1); /* user level security, don't
* encrypt */
- Protocol = PROTOCOL_COREPLUS;
+ set_Protocol(PROTOCOL_COREPLUS);
}
/****************************************************************************
SSVAL(req->outbuf,smb_vwv11, 8);
}
- Protocol = PROTOCOL_LANMAN1;
+ set_Protocol(PROTOCOL_LANMAN1);
/* Reply, SMBlockread, SMBwritelock supported. */
SCVAL(req->outbuf,smb_flg,FLAG_REPLY|FLAG_SUPPORT_LOCKREAD);
SSVAL(req->outbuf,smb_vwv11, 8);
}
- Protocol = PROTOCOL_LANMAN2;
+ set_Protocol(PROTOCOL_LANMAN2);
/* Reply, SMBlockread, SMBwritelock supported. */
SCVAL(req->outbuf,smb_flg,FLAG_REPLY|FLAG_SUPPORT_LOCKREAD);
SSVAL(req->outbuf,smb_vwv0,choice);
SCVAL(req->outbuf,smb_vwv1,secword);
- Protocol = PROTOCOL_NT1;
+ set_Protocol(PROTOCOL_NT1);
SSVAL(req->outbuf,smb_vwv1+1,lp_maxmux()); /* maxmpx */
SSVAL(req->outbuf,smb_vwv2+1,1); /* num vcs */
reply_nterror(req, NT_STATUS_NO_MEMORY);
return;
}
+ p += ret;
DEBUG(3,("not using SPNEGO\n"));
} else {
DATA_BLOB spnego_blob = negprot_spnego();
DEBUG( 5, ( "negprot index=%d\n", choice ) );
- if ((lp_server_signing() == Required) && (Protocol < PROTOCOL_NT1)) {
+ if ((lp_server_signing() == Required) && (get_Protocol() < PROTOCOL_NT1)) {
exit_server_cleanly("SMB signing is required and "
"client negotiated a downlevel protocol");
}