mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
auth3: Slightly simplify make_auth_context_subsystem() step2
Use "git show -b" to see the simple diff. BUG: https://bugzilla.samba.org/show_bug.cgi?id=2976 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
3fd7707cdf
commit
b78de58e57
@ -479,48 +479,43 @@ NTSTATUS make_auth_context_subsystem(TALLOC_CTX *mem_ctx,
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
if (auth_method_list == NULL) {
|
||||
switch (lp_server_role())
|
||||
{
|
||||
case ROLE_DOMAIN_MEMBER:
|
||||
DEBUG(5,("Making default auth method list for server role = 'domain member'\n"));
|
||||
switch (lp_server_role()) {
|
||||
case ROLE_DOMAIN_MEMBER:
|
||||
DEBUG(5,("Making default auth method list for server role = 'domain member'\n"));
|
||||
auth_method_list = str_list_make_v3(
|
||||
talloc_tos(), "guest sam winbind:ntdomain",
|
||||
NULL);
|
||||
break;
|
||||
case ROLE_DOMAIN_BDC:
|
||||
case ROLE_DOMAIN_PDC:
|
||||
DEBUG(5,("Making default auth method list for DC\n"));
|
||||
auth_method_list = str_list_make_v3(
|
||||
talloc_tos(),
|
||||
"guest sam winbind:trustdomain",
|
||||
NULL);
|
||||
break;
|
||||
case ROLE_STANDALONE:
|
||||
DEBUG(5,("Making default auth method list for server role = 'standalone server', encrypt passwords = yes\n"));
|
||||
if (lp_encrypt_passwords()) {
|
||||
auth_method_list = str_list_make_v3(
|
||||
talloc_tos(), "guest sam winbind:ntdomain",
|
||||
NULL);
|
||||
break;
|
||||
case ROLE_DOMAIN_BDC:
|
||||
case ROLE_DOMAIN_PDC:
|
||||
DEBUG(5,("Making default auth method list for DC\n"));
|
||||
talloc_tos(), "guest sam",
|
||||
NULL);
|
||||
} else {
|
||||
DEBUG(5,("Making default auth method list for server role = 'standalone server', encrypt passwords = no\n"));
|
||||
auth_method_list = str_list_make_v3(
|
||||
talloc_tos(),
|
||||
"guest sam winbind:trustdomain",
|
||||
NULL);
|
||||
break;
|
||||
case ROLE_STANDALONE:
|
||||
DEBUG(5,("Making default auth method list for server role = 'standalone server', encrypt passwords = yes\n"));
|
||||
if (lp_encrypt_passwords()) {
|
||||
auth_method_list = str_list_make_v3(
|
||||
talloc_tos(), "guest sam",
|
||||
NULL);
|
||||
} else {
|
||||
DEBUG(5,("Making default auth method list for server role = 'standalone server', encrypt passwords = no\n"));
|
||||
auth_method_list = str_list_make_v3(
|
||||
talloc_tos(), "guest unix", NULL);
|
||||
}
|
||||
break;
|
||||
case ROLE_ACTIVE_DIRECTORY_DC:
|
||||
DEBUG(5,("Making default auth method list for server role = 'active directory domain controller'\n"));
|
||||
auth_method_list = str_list_make_v3(
|
||||
talloc_tos(),
|
||||
"samba4",
|
||||
NULL);
|
||||
break;
|
||||
default:
|
||||
DEBUG(5,("Unknown auth method!\n"));
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
talloc_tos(), "guest unix", NULL);
|
||||
}
|
||||
} else {
|
||||
DEBUG(5,("Using specified auth order\n"));
|
||||
break;
|
||||
case ROLE_ACTIVE_DIRECTORY_DC:
|
||||
DEBUG(5,("Making default auth method list for server role = 'active directory domain controller'\n"));
|
||||
auth_method_list = str_list_make_v3(
|
||||
talloc_tos(),
|
||||
"samba4",
|
||||
NULL);
|
||||
break;
|
||||
default:
|
||||
DEBUG(5,("Unknown auth method!\n"));
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
nt_status = make_auth_context_text_list(mem_ctx, auth_context,
|
||||
|
Loading…
x
Reference in New Issue
Block a user