s3:winbindd: pass 'interactive' down through winbindd_dual_auth_passdb()
authorStefan Metzmacher <metze@samba.org>
Thu, 2 Jun 2016 16:13:40 +0000 (18:13 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 30 Jun 2016 01:30:23 +0000 (03:30 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11441

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/winbindd/winbindd_pam.c

index 891042355554adc4eba035dff55cc79dd0d0c579..2cfd88ae6db6f06d08aa73847b9213e7c7268fcb 100644 (file)
@@ -1233,6 +1233,7 @@ static NTSTATUS winbindd_dual_auth_passdb(TALLOC_CTX *mem_ctx,
                                          const DATA_BLOB *challenge,
                                          const DATA_BLOB *lm_resp,
                                          const DATA_BLOB *nt_resp,
+                                         bool interactive,
                                          struct netr_SamInfo3 **pinfo3)
 {
        struct auth_context *auth_context;
@@ -1270,6 +1271,10 @@ static NTSTATUS winbindd_dual_auth_passdb(TALLOC_CTX *mem_ctx,
        /* We don't want to come back to winbindd or to do PAM account checks */
        user_info->flags |= USER_INFO_LOCAL_SAM_ONLY | USER_INFO_INFO3_AND_NO_AUTHZ;
 
+       if (interactive) {
+               user_info->flags |= USER_INFO_INTERACTIVE_LOGON;
+       }
+
        status = make_auth_context_fixed(frame, &auth_context, challenge->data);
 
        if (!NT_STATUS_IS_OK(status)) {
@@ -1541,7 +1546,9 @@ static NTSTATUS winbindd_dual_pam_auth_samlogon(TALLOC_CTX *mem_ctx,
 
                result = winbindd_dual_auth_passdb(
                        mem_ctx, 0, name_domain, name_user,
-                       &chal_blob, &lm_resp, &nt_resp, info3);
+                       &chal_blob, &lm_resp, &nt_resp,
+                       true, /* interactive */
+                       info3);
 
                /* 
                 * We need to try the remote NETLOGON server if this is NOT_IMPLEMENTED 
@@ -1955,7 +1962,9 @@ NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
                        mem_ctx,
                        logon_parameters,
                        name_domain, name_user,
-                       &chal_blob, &lm_response, &nt_response, info3);
+                       &chal_blob, &lm_response, &nt_response,
+                       false, /* interactive */
+                       info3);
 
                /* 
                 * We need to try the remote NETLOGON server if this is NOT_IMPLEMENTED