[Bug 19781] Visual C++ 2005 Express: -Zi option doesn't work; breaks Firefox build's configure script

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Oct 6 03:34:20 CDT 2009


http://bugs.winehq.org/show_bug.cgi?id=19781





--- Comment #8 from Hans Leidekker <hans at meelstraat.net>  2009-10-06 03:34:19 ---
I've submitted a test showing that InitializeSecurityContext
returns SEC_I_CONTINUE_NEEDED after supplying null authentication
data to AcquireCredentialsHandle.

The problem is that on Wine there's currently no concept of a
"security login context for the current address space", as msdn
calls it. This is what will be used when you pass null authentication
data to AcquireCredentialsHandle.

You can work around this bug by caching credentials, e.g. with code
like this:

    CREDENTIALA cred;
    static WCHAR pwd[] = {'p','w','d'};
    static char user[] = {'h','o','s','t','\\','u','s','e','r',0};

    memset(&cred, 0, sizeof(cred));
    cred.Type               = CRED_TYPE_DOMAIN_PASSWORD;
    cred.TargetName         = user;
    cred.CredentialBlobSize = sizeof(pwd);
    cred.CredentialBlob     = (LPBYTE)pwd;
    cred.Persist            = CRED_PERSIST_SESSION;
    cred.UserName           = user;

    CredWriteA(&cred, 0);

Substituting static data appropriately, of course. Now
InitializeSecurityContext will return SEC_I_CONTINUE_NEEDED
and we run into another crash:

001a:Ret  secur32.EncryptMessage() retval=80090321 ret=7eb3f895
001a:err:rpc:RPCRT4_SecurePacket EncryptMessage failed with 0x80090321
001a:Call ntdll.RtlFreeHeap(00110000,00000000,001699b8) ret=7eb408ce
001a:Ret  ntdll.RtlFreeHeap() retval=00000001 ret=7eb408ce
001a:Call ntdll.RtlFreeHeap(00110000,00000000,00169b10) ret=7eb3f356
001a:Ret  ntdll.RtlFreeHeap() retval=00000001 ret=7eb3f356
001a:Call KERNEL32.RaiseException(00000721,00000000,00000000,00000000)
ret=7eb4d405

80090321 == SEC_E_BUFFER_TOO_SMALL. Is rpcrt4 calling EncryptMessage
too early, i.e. before completing the ntlm handshake?

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list