[Bug 60384] New: Unable to log in to Medicalc4
http://bugs.winehq.org/show_bug.cgi?id=60384 Bug ID: 60384 Summary: Unable to log in to Medicalc4 Product: Wine Version: 11.17 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@list.winehq.org Reporter: tadeas.janosek@mapogroup.cz Target Milestone: --- Distribution: --- Created attachment 82178 --> http://bugs.winehq.org/attachment.cgi?id=82178 Archive with relevant logs Attempts to log in into the application always fails with invalid user name or password. Info about the application: - Medicalc4.exe is 32bit binary. - user is authentificated against Active Directory Environment variables I used - LDAPREFERRALS=off - LDAPSASL_NOCANON=on Testing was done on domain joined Archlinux. On wine version 11.15 when ran without LDAPSASL_NOCANON=on (wine-11.15.log) the application works but from the logs it seems it uses NTLM instead of kerberos. Howerver on version 11.17 and later it no longer falls back to NTLM. By setting LDAPSASL_NOCANON=on the app successfully obtains kerberos ticket, but login still fails. (Verified by setting KRB5_TRACE, wine-11.17-krb5.log) After entering credentials and pressing login button the program recieves SIGSEGV at __wine_unix_call_dispatcher (gdb.txt). ChatGPT suggested to try initializing the Kerberos unixlib in kerberos_SpInstanceInit in dlls/kerberos/krb5_ap.c with following change: ``` static NTSTATUS NTAPI kerberos_SpInstanceInit(ULONG version, SECPKG_DLL_FUNCTIONS *dll_function_table, void **user_functions) { NTSTATUS status; TRACE("%#lx, %p, %p\n", version, dll_function_table, user_functions); TRACE("before unix init: __wine_unixlib_handle=%p\n", __wine_unixlib_handle); if (!__wine_unixlib_handle) { status = __wine_init_unix_call(); TRACE("__wine_init_unix_call returned %#lx, handle=%p\n", status, __wine_unixlib_handle); if (status) return status; status = KRB5_CALL(process_attach, NULL); TRACE("process_attach returned %#lx\n", status); if (status) return status; } return STATUS_SUCCESS; } ``` After compiling wine with this change I can confirm that I am able to log in but I am not sure this is correct way to fix this. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=60384 --- Comment #1 from Hans Leidekker <hans@meelstraat.net> --- I would expect the unixlib to be initialized via kerberos_LsaApInitializePackage() or kerberos_SpInitialize(). Can you attach a WINEDEBUG=+secur32,+kerberos log? -- 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.
http://bugs.winehq.org/show_bug.cgi?id=60384 --- Comment #2 from Tadeáš Janošek <tadeas.janosek@mapogroup.cz> --- Created attachment 82211 --> http://bugs.winehq.org/attachment.cgi?id=82211 Wine log with WINEDEBUG=+secur32,+kerberos -- 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.
http://bugs.winehq.org/show_bug.cgi?id=60384 --- Comment #3 from Hans Leidekker <hans@meelstraat.net> --- (In reply to Tadeáš Janošek from comment #2)
Created attachment 82211 [details] Wine log with WINEDEBUG=+secur32,+kerberos
I see why the other places where kerberos is initialized aren't called: this part has been moved to a different process with the introduction of lsass. Looks like kerberos_SpInitUserModeContext() is the best place to initialize. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=60384 --- Comment #4 from Hans Leidekker <hans@meelstraat.net> --- Created attachment 82216 --> http://bugs.winehq.org/attachment.cgi?id=82216 patch Can you try this patch? -- 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.
http://bugs.winehq.org/show_bug.cgi?id=60384 --- Comment #5 from Tadeáš Janošek <tadeas.janosek@mapogroup.cz> --- Created attachment 82223 --> http://bugs.winehq.org/attachment.cgi?id=82223 Wine logs with the patch applied and WINEDEBUG=+secur32,+kerberos I tested the patch and for some reason the first login attempt always fails but next attempt passes. I also tried to use code from the patch in kerberos_SpInstanceInit() and in this scenario I am able to login on first try. I attached logs from both scenarios. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=60384 Hans Leidekker <hans@meelstraat.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82216|0 |1 is obsolete| | --- Comment #6 from Hans Leidekker <hans@meelstraat.net> --- Created attachment 82224 --> http://bugs.winehq.org/attachment.cgi?id=82224 patch Thanks, here's a patch that moves unixlib initialization to DllMain() instead. We can now fail loading the dll when the unixlib is not available because this code was moved from secur32 to its own dll. That should cover all possible entries into the dll. Does this also fix your problem? -- 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.
http://bugs.winehq.org/show_bug.cgi?id=60384 --- Comment #7 from Tadeáš Janošek <tadeas.janosek@mapogroup.cz> --- (In reply to Hans Leidekker from comment #6)
Created attachment 82224 [details] patch
Thanks, here's a patch that moves unixlib initialization to DllMain() instead. We can now fail loading the dll when the unixlib is not available because this code was moved from secur32 to its own dll.
That should cover all possible entries into the dll. Does this also fix your problem?
I can confirm that this patch solved it. Thank you for looking into it. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=60384 Vijay Kamuju <infyquest@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |infyquest@gmail.com Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |39f798cbc51cbbd3bc1214fd33a | |743c732264bb7 Resolution|--- |FIXED --- Comment #8 from Vijay Kamuju <infyquest@gmail.com> --- Fix merged https://gitlab.winehq.org/wine/wine/-/commit/39f798cbc51cbbd3bc1214fd33a743c... -- 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.
http://bugs.winehq.org/show_bug.cgi?id=60384 Alexandre Julliard <julliard@winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #9 from Alexandre Julliard <julliard@winehq.org> --- Closing bugs fixed in 11.20. -- 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.
participants (1)
-
WineHQ Bugzilla