winbind_pam: Use any_nt_status_not_ok in map_auth_samlogon
authorVolker Lendecke <vl@samba.org>
Mon, 6 Mar 2017 20:36:25 +0000 (20:36 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 11 Apr 2017 23:41:14 +0000 (01:41 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/winbindd_pam.c

index 292f556e25babd590c25936c94e5b3b700e41270..718acd70f4e894179ae33a19b974b0b38b452705 100644 (file)
@@ -1695,18 +1695,13 @@ static NTSTATUS winbindd_dual_pam_auth_samlogon(TALLOC_CTX *mem_ctx,
                                                       &info,
                                                       &result_tmp);
 
-               if (!NT_STATUS_IS_OK(status_tmp)) {
+               if (any_nt_status_not_ok(status_tmp, result_tmp,
+                                        &status_tmp)) {
                        DEBUG(3, ("could not query user info on SAMR pipe: %s\n",
                                nt_errstr(status_tmp)));
                        dcerpc_samr_Close(b, mem_ctx, &user_pol, &result_tmp);
                        goto done;
                }
-               if (!NT_STATUS_IS_OK(result_tmp)) {
-                       DEBUG(3, ("could not query user info on SAMR pipe: %s\n",
-                               nt_errstr(result_tmp)));
-                       dcerpc_samr_Close(b, mem_ctx, &user_pol, &result_tmp);
-                       goto done;
-               }
 
                acct_flags = info->info16.acct_flags;