return ans->ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_SEAL;
}
-/* Needed for 'smb username' processing */
-const char *auth_ntlmssp_get_username(struct auth_ntlmssp_state *ans)
-{
- if (ans->gensec_security) {
- return ""; /* We can't get at this value, and it's just for the %U macros */
- }
- return ans->ntlmssp_state->user;
-}
-
-const uint8_t *auth_ntlmssp_get_nt_hash(struct auth_ntlmssp_state *ans)
-{
- return ans->ntlmssp_state->nt_hash;
-}
-
NTSTATUS auth_ntlmssp_set_username(struct auth_ntlmssp_state *ans,
const char *user)
{
return ntlmssp_set_password(ans->ntlmssp_state, password);
}
-void auth_ntlmssp_and_flags(struct auth_ntlmssp_state *ans, uint32_t flags)
-{
- ans->ntlmssp_state->neg_flags &= flags;
-}
-
-void auth_ntlmssp_or_flags(struct auth_ntlmssp_state *ans, uint32_t flags)
-{
- ans->ntlmssp_state->neg_flags |= flags;
-}
-
void auth_ntlmssp_want_feature(struct auth_ntlmssp_state *ans, uint32_t feature)
{
if (ans->gensec_security) {
}
NTSTATUS auth_ntlmssp_update(struct auth_ntlmssp_state *ans,
+ TALLOC_CTX *mem_ctx,
const DATA_BLOB request, DATA_BLOB *reply)
{
+ NTSTATUS status;
if (ans->gensec_security) {
- return gensec_update(ans->gensec_security, ans, request, reply);
+ return gensec_update(ans->gensec_security, mem_ctx, request, reply);
+ }
+ status = ntlmssp_update(ans->ntlmssp_state, request, reply);
+ if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
+ return status;
}
- return ntlmssp_update(ans->ntlmssp_state, request, reply);
+ talloc_steal(mem_ctx, reply->data);
+ return status;
}
NTSTATUS auth_ntlmssp_client_start(TALLOC_CTX *mem_ctx,