auth3: Slightly simplify make_auth_context_subsystem() step1
authorVolker Lendecke <vl@samba.org>
Mon, 13 Mar 2017 07:43:06 +0000 (08:43 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 24 Mar 2017 10:57:08 +0000 (11:57 +0100)
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>
source3/auth/auth.c

index 1cbe46e67561d65c34a2b210102cccdbf99263e2..034701de6cf7c22bb8e9b9f6a6bbcc6501a90dca 100644 (file)
@@ -471,10 +471,12 @@ NTSTATUS make_auth_context_subsystem(TALLOC_CTX *mem_ctx,
        char **auth_method_list = NULL; 
        NTSTATUS nt_status;
 
-       if (lp_auth_methods()
-           && !(auth_method_list = str_list_copy(talloc_tos(), 
-                             lp_auth_methods()))) {
-               return NT_STATUS_NO_MEMORY;
+       if (lp_auth_methods()) {
+               DEBUG(5,("Using specified auth order\n"));
+               nt_status = make_auth_context_text_list(
+                       mem_ctx, auth_context,
+                       discard_const_p(char *, lp_auth_methods()));
+               return nt_status;
        }
 
        if (auth_method_list == NULL) {