1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

auth3: only use "[samba4:]sam" in make_auth3_context_for_winbind()

This makes the USER_INFO_LOCAL_SAM_ONLY and AUTH_METHOD_LOCAL_SAM
interaction obsolete.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=2976

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2017-03-17 16:46:38 +01:00
parent 61e499cbaa
commit a363a7936c

View File

@ -544,7 +544,24 @@ NTSTATUS make_auth3_context_for_netlogon(TALLOC_CTX *mem_ctx,
NTSTATUS make_auth3_context_for_winbind(TALLOC_CTX *mem_ctx,
struct auth_context **auth_context)
{
return make_auth_context_subsystem(mem_ctx, auth_context);
const char *methods = NULL;
switch (lp_server_role()) {
case ROLE_STANDALONE:
case ROLE_DOMAIN_MEMBER:
case ROLE_DOMAIN_BDC:
case ROLE_DOMAIN_PDC:
methods = "sam";
break;
case ROLE_ACTIVE_DIRECTORY_DC:
methods = "samba4:sam";
break;
default:
DEBUG(5,("Unknown auth method!\n"));
return NT_STATUS_UNSUCCESSFUL;
}
return make_auth_context_specific(mem_ctx, auth_context, methods);
}
bool auth3_context_set_challenge(struct auth_context *ctx, uint8_t chal[8],