]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Fix a segfault
authorVolker Lendecke <vl@samba.org>
Tue, 25 Mar 2008 21:21:50 +0000 (22:21 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 25 Mar 2008 22:36:06 +0000 (23:36 +0100)
When we get a NT_STATUS_WRONG_PASSWORD for example, my_info3 is not initialized
at all. So first check that we have NT_STATUS_IS_OK(status) before we
dereference my_info3.

source/winbindd/winbindd_pam.c

index c56eb1b3f89ab69496d99947bc1236bcc7c5760a..5712f0860389f0f3116841b48f7705ef4bacc5c5 100644 (file)
@@ -1362,7 +1362,7 @@ NTSTATUS winbindd_dual_pam_auth_samlogon(struct winbindd_domain *domain,
         * caller, we look up the account flags ourselve - gd */
 
        if ((state->request.flags & WBFLAG_PAM_INFO3_TEXT) && 
-           (my_info3->base.acct_flags == 0) && NT_STATUS_IS_OK(result)) {
+           NT_STATUS_IS_OK(result) && (my_info3->base.acct_flags == 0)) {
 
                struct rpc_pipe_client *samr_pipe;
                POLICY_HND samr_domain_handle, user_pol;