diff options
author | Stefan Metzmacher <metze@samba.org> | 2017-03-17 16:46:38 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2017-03-24 11:57:10 +0100 |
commit | a363a7936cefd76d923c1106677ddc5c322e3bc5 (patch) | |
tree | f4793cb6268d3f2ba0d19745f4e9b96f21706ef4 /source3/auth | |
parent | 61e499cbaa291b512e8647e1288be7811bca2377 (diff) | |
download | samba-a363a7936cefd76d923c1106677ddc5c322e3bc5.tar.gz |
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>
Diffstat (limited to 'source3/auth')
-rw-r--r-- | source3/auth/auth.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c index 11a777a404f..31313c76f77 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -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], |