#include "includes.h"
#include "rpc_server/dcesrv_ntlmssp.h"
-#include "../libcli/auth/ntlmssp.h"
+#include "../auth/ntlmssp/ntlmssp.h"
#include "ntlmssp_wrap.h"
#include "auth.h"
+#include "auth/gensec/gensec.h"
NTSTATUS ntlmssp_server_auth_start(TALLOC_CTX *mem_ctx,
bool do_sign,
}
if (do_sign) {
- auth_ntlmssp_want_feature(a, NTLMSSP_FEATURE_SIGN);
+ gensec_want_feature(a->gensec_security, GENSEC_FEATURE_SIGN);
}
if (do_seal) {
/* Always implies both sign and seal for ntlmssp */
- auth_ntlmssp_want_feature(a, NTLMSSP_FEATURE_SEAL);
+ gensec_want_feature(a->gensec_security, GENSEC_FEATURE_SEAL);
}
status = auth_ntlmssp_start(a);
return status;
}
- status = auth_ntlmssp_update(a, mem_ctx, *token_in, token_out);
+ status = gensec_update(a->gensec_security, mem_ctx, NULL, *token_in, token_out);
if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
DEBUG(0, (__location__ ": auth_ntlmssp_update failed: %s\n",
nt_errstr(status)));
/* this has to be done as root in order to verify the password */
become_root();
- status = auth_ntlmssp_update(ctx, mem_ctx, *token_in, token_out);
+ status = gensec_update(ctx->gensec_security, mem_ctx, NULL, *token_in, token_out);
unbecome_root();
return status;
NTSTATUS ntlmssp_server_check_flags(struct auth_ntlmssp_state *ctx,
bool do_sign, bool do_seal)
{
- if (do_sign && !auth_ntlmssp_negotiated_sign(ctx)) {
+ if (do_sign && !gensec_have_feature(ctx->gensec_security, GENSEC_FEATURE_SIGN)) {
DEBUG(1, (__location__ "Integrity was requested but client "
"failed to negotiate signing.\n"));
return NT_STATUS_ACCESS_DENIED;
}
- if (do_seal && !auth_ntlmssp_negotiated_seal(ctx)) {
+ if (do_seal && !gensec_have_feature(ctx->gensec_security, GENSEC_FEATURE_SEAL)) {
DEBUG(1, (__location__ "Privacy was requested but client "
"failed to negotiate sealing.\n"));
return NT_STATUS_ACCESS_DENIED;
{
NTSTATUS status;
- status = auth_ntlmssp_session_info(mem_ctx, ctx, session_info);
+ status = gensec_session_info(ctx->gensec_security, mem_ctx, session_info);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1, (__location__ ": Failed to get authenticated user "
"info: %s\n", nt_errstr(status)));