s3: Fix a segfault in winbindd_dual_ccache_ntlm_auth()
authorVolker Lendecke <vl@samba.org>
Sat, 9 Jan 2010 19:22:00 +0000 (20:22 +0100)
committerVolker Lendecke <vl@samba.org>
Sat, 9 Jan 2010 19:37:39 +0000 (20:37 +0100)
ntlmssp_update allocates the reply_blob as a child of ntlmssp_state. This means
with ntlmss_end() it will be gone. winbindd_dual_ccache_ntlm_auth used the blob
after the ntlmssp_end().

source3/winbindd/winbindd_ccache_access.c

index 921110a0be5bf6527972150728208507bb97d47e..2f71aaae527c6a4ed3ba93fe9e145b4740359e4c 100644 (file)
@@ -116,7 +116,7 @@ static NTSTATUS do_ntlm_auth_with_hashes(const char *username,
                data_blob_free(&reply);
                goto done;
        }
-       *auth_msg = reply;
+       *auth_msg = data_blob(reply.data, reply.length);
        status = NT_STATUS_OK;
 
 done: