http://bugs.winehq.org/show_bug.cgi?id=16418
Summary: Keyword corral crashes (because of unimplemented advapi.LsaLookupSids) Product: Wine Version: 1.1.10 Platform: Other URL: http://www.johncow.com/brand-new-free-keyword-corral- tool-by-john-cow-dot-com/ OS/Version: other Status: NEW Keywords: download Severity: normal Priority: P2 Component: advapi32 AssignedTo: wine-bugs@winehq.org ReportedBy: xerox_xerox2000@yahoo.co.uk
Hi, a user reported trouble with this app on user-list. It crashes right away with:
Unhandled Exception: System.Security.Principal.IdentityNotMappedException: Some or all identity references could not be translated. at System.Security.Principal.SecurityIdentifier.Translate(IdentityReferenceCollection sourceSids, Type targetType, Boolean forceSuccess)
The problem seems to be this line from the consoleoutput:
fixme:advapi:LsaLookupSids (0xcafe,1,0x877c08,0x32f154,0x32f148) stub
Simply returning STATUS_SUCCESS instead of STATUS_NOT_MAPPED didn't help (crashed with a null pointer derefernce), so i guess this'll need a kind of real implementation of LsaLookupSids
http://bugs.winehq.org/show_bug.cgi?id=16418
Kai Blin kai.blin@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|wine-bugs@winehq.org |kai.blin@gmail.com Status|NEW |ASSIGNED
--- Comment #1 from Kai Blin kai.blin@gmail.com 2008-12-09 03:31:15 --- Created an attachment (id=17766) --> (http://bugs.winehq.org/attachment.cgi?id=17766) Get more debug output from LsaLookupSids
Hi,
can you give me an advapi trace with the attached patch applied?
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #2 from Austin English austinenglish@gmail.com 2008-12-09 05:11:39 --- http://www.johncow.com/wp-content/uploads/2008/08/KeyWordCorral_Install.msi
I get:
** (KeywordCorral.exe:23): WARNING **: string marshalling conversion 34 not implemented
Unhandled Exception: System.NotImplementedException: string marshalling conversion 34 not implemented
in yesterday's git (after winetricks mono20 gdiplus).
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #3 from Kai Blin kai.blin@gmail.com 2008-12-09 06:43:09 --- That seems unconnected with what was reported before.
http://bugs.winehq.org/show_bug.cgi?id=16418
Kai Blin kai.blin@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|kai.blin@gmail.com |wine-bugs@winehq.org Status|ASSIGNED |NEW Component|advapi32 |-unknown
--- Comment #4 from Kai Blin kai.blin@gmail.com 2008-12-09 08:02:13 --- Not an advapi bug. At least I can't get far enough to get to the advapi bug.
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #5 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2008-12-09 10:20:50 --- Hi, i used dotnet20 ( so winetricks dotnet20) and not mono.
Then I get the advapi-bug. I haven't tested with mono, as I can't tell whether or not a crash is due to a bug in wine, or unimplemented stuff/bug in mono, right?
So this bugreport is for dotnet20 only. I'll try the patch to get more debuginfo and report back
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #6 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2008-12-09 10:26:29 --- I took the freedom to change the TRACE into a FIXME; this is relevant part:
fixme:advapi:LsaLookupSids (0xcafe,1,0x877c08,0x32f194,0x32f188) stub fixme:advapi:LsaLookupSids sid[0]: S-1-5-4 fixme:advapi:LsaClose (0xcafe) stub
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #7 from Austin English austinenglish@gmail.com 2008-12-09 12:12:58 --- (In reply to comment #5)
Hi, i used dotnet20 ( so winetricks dotnet20) and not mono.
Then I get the advapi-bug. I haven't tested with mono, as I can't tell whether or not a crash is due to a bug in wine, or unimplemented stuff/bug in mono, right?
So this bugreport is for dotnet20 only. I'll try the patch to get more debuginfo and report back
I tried with dotnet20 and get your results. I had use mono20 the first time.
http://bugs.winehq.org/show_bug.cgi?id=16418
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #8 from Anastasius Focht focht@gmx.net 2008-12-09 16:19:21 --- Hello,
yes, you will need some 'flesh' in local security authority subsystem for this to work.
The .NET common language runtime (CLR) expects data in out params and status 'success' for LsaLookupSids(). You can't get away by simply returning nothing.
1) PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains
Out param (LSA_REFERENCED_DOMAIN_LIST) needs to have a least one list entry (necessary because LSA_TRANSLATED_NAME entry domain index will reference this array). For that single LSA_TRUST_INFORMATION entry, local domain data (maybe from ADVAPI_GetDomainName) will be sufficient. 'Name' member must not be NULL, 'Sid' seems not evaluated by caller/CLR (causing no exception).
2) OUT PLSA_TRANSLATED_NAME *Names
The runtime expects an array of 'Count' LSA_TRANSLATED_NAME entries returned (populated by caller, fewer entries will lead to null pointer exception). For 'Use' member, 'SidTypeUser' value seems a safe bet, some other enum values will give IdentityNotMappedException. 'Name' must not be null (you get zero name length exception). 'DomainIndex' should be 0 (referring to first list entry).
This seems to be the minimal requirements to keep .NET CLR happy for this API. It will later bump into next LSA stub/problem, which should be a targeted by different bug.
Note: Take care of possible memory leaks for array list members/embedded lsa strings when the caller cleans up using LsaFreeMemory() (passing opaque ptr).
Regards
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #9 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2008-12-11 10:19:18 --- (In reply to comment #9)
I did a bit of testing on XP and seems like ReferencedDomains[0].Entries = 1 indeed, but ReferencedDomains[0].Domains->Name.Buffer resolves to nothing.
Further Names[0].Name.Buffer resolves to "INTERACTIVE", and Names[0].Use = SidTypeWellKnownGroup;
It then continues to LsaLookupNames. From test on xp seems ReferencedDomains[0].Domains->Name.Buffer should resolve to "NT AUTHORITY", but somehow it keeps crashing with access violations when i hack that in. Maybe i'm doing something wrong.
http://bugs.winehq.org/show_bug.cgi?id=16418
Jeff Zaroyko jeffz@jeffz.name changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |julien.carsique@noos.fr
--- Comment #10 from Jeff Zaroyko jeffz@jeffz.name 2008-12-16 05:03:41 --- *** Bug 10183 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=16418
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet
http://bugs.winehq.org/show_bug.cgi?id=16418
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |advapi32 Severity|normal |major
--- Comment #11 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2009-06-01 08:39:09 --- changed importance to major: this affects dozens of .net 2.0 applications, especially the recently written ones.
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #12 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2009-06-14 14:54:22 --- Created an attachment (id=21794) --> (http://bugs.winehq.org/attachment.cgi?id=21794) minimal patch
i attach here minimal patch i currently use that works around this bug. not sure if such a minimal "implementation" would be accepted in main tree...
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #13 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2009-06-16 15:55:58 --- Created an attachment (id=21829) --> (http://bugs.winehq.org/attachment.cgi?id=21829) patch: handle some cases by LookupAccountSidW
I think in most cases we can get away with LookupAccountSidW, i have fixed up some tests that pass with this patch, i'll polish them up and attach them later. Any comments appreciated
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #14 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2009-06-17 09:27:59 --- Created an attachment (id=21844) --> (http://bugs.winehq.org/attachment.cgi?id=21844) start of test
tested on winxp succeeds
http://bugs.winehq.org/show_bug.cgi?id=16418
EA Durbin ead1234@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ead1234@hotmail.com
--- Comment #15 from EA Durbin ead1234@hotmail.com 2009-08-13 14:05:34 --- (In reply to comment #14)
Created an attachment (id=21844)
--> (http://bugs.winehq.org/attachment.cgi?id=21844) [details]
start of test
tested on winxp succeeds
This unhandled exception error is also present in Family Tree Maker 2008 and crashes on loading. What is the status of this patch? If you need me to help test something let me know.
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #16 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2009-09-29 15:37:06 --- Little update:
In current git LsaLookupSids has a partial implementation now. However, not enough to get this app going.
With the not (yet?) accepted patch from Aric here http://www.winehq.org/pipermail/wine-patches/2009-September/078867.html the app seems to be more happy, it's enough to get the app pass around this bug, however it still crashes.
The problem now seems to be LsaLookupNames2 doesn't handle a single domain name correctly ("NT AUTHORITY" is passed in, and LsaLookupNames2 returns ERROR_NONE_MAPPED)
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #17 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2009-10-11 16:21:57 --- In current git the behaviour of LsaLookupSids seems to be OK. The problem is now in LsaLookupNames2 as stated in my lsat comment: The problem now seems to be LsaLookupNames2 doesn't handle a single domain name correctly ("NT AUTHORITY" is passed in, and LsaLookupNames2 returns ERROR_NONE_MAPPED)
http://bugs.winehq.org/show_bug.cgi?id=16418
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Keyword corral crashes |Keyword corral crashes |(because of unimplemented |(LsaLookupNames2 returns |advapi.LsaLookupSids) |ERROR_NONE_MAPPED)
--- Comment #18 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2009-10-11 16:24:25 --- changed title of bug
http://bugs.winehq.org/show_bug.cgi?id=16418
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hans@meelstraat.net
--- Comment #19 from Hans Leidekker hans@meelstraat.net 2009-10-12 03:14:43 --- Hi Louis, can you please attach a +advapi trace?
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #20 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2009-10-12 16:14:53 --- (In reply to comment #19)
Hi Louis, can you please attach a +advapi trace?
Hi Hans, looks like there's another regression in current git (must have slipped in last week) that prevents Keyword Corral (and other apps i tested) from running into this bug, they just crash earlier. I don't have the time right now to run regression test completely, so I'll just attach the +advapi log with wine version: wine-1.1.30-315-g0d72697
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #21 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2009-10-12 16:16:13 --- Created an attachment (id=24057) --> (http://bugs.winehq.org/attachment.cgi?id=24057) +advapi trace (with wine version of about 1.5 weeks ago)
+ advapi trace with wine version of about 1.5 week ago
http://bugs.winehq.org/show_bug.cgi?id=16418
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #24057|application/octet-stream |text/plain mime type| |
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #22 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2009-10-12 16:21:42 --- Created an attachment (id=24058) --> (http://bugs.winehq.org/attachment.cgi?id=24058) crash in current git
In current git it crashes earlier:
Unhandled Exception: OutOfMemoryException. wine: Unhandled exception 0xe0434f4d at address 0x7b843913 (thread 002f), starting debugger...
I'm rather busy atm, i'll see if i can do regression test later this week
http://bugs.winehq.org/show_bug.cgi?id=16418
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #23 from Dan Kegel dank@kegel.com 2010-02-06 19:43:51 --- This also affects Living Cookbook 2008 Trial, which can be downloaded from http://www.livingcookbook.com/product/freetrial.aspx It aborts as in comment #21, with a dialog complaining about "some or all identity references could not be translated".
http://bugs.winehq.org/show_bug.cgi?id=16418
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.2.0
--- Comment #24 from Dan Kegel dank@kegel.com 2010-02-07 17:04:37 --- Affects multiple apps, well documented -> nominating for 1.2
http://bugs.winehq.org/show_bug.cgi?id=16418
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |komaksab@fastmail.fm
--- Comment #25 from Nikolay Sivov bunglehead@gmail.com 2010-02-08 14:22:33 --- *** Bug 21583 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #26 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2010-03-21 16:35:14 --- Created an attachment (id=26957) --> (http://bugs.winehq.org/attachment.cgi?id=26957) more tests
more tests for lsalookupsids. After all this bug seems to be in lsalookupsids, and not in lsalookupnames2
The attached tests show that the domainsize and namesize are not correctly filled in by wine. The tests succeed on windows Xp, but fail in wine. I'll attach a possible fix hereafter
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #27 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2010-03-21 16:39:59 --- Created an attachment (id=26958) --> (http://bugs.winehq.org/attachment.cgi?id=26958) patch to make tests pass
This patch makes the tests pass in wine, however i'm not sure if this would be the correct fix.
After adding some extra traces to LsaLookUpNames2 it shows that now "NT AUTHORITY\INTERACTIVE" is passed on to LsaLookUpNames2, which is mapped nicely. Without the attached patch only "NT AUTHORITY" is passed on, which LsaLookUpNames2 cannot map
With the patch the cookbook program, WoWus, and cryptload start up. I'll have another look later this week
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #28 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2010-03-28 16:38:50 --- Created an attachment (id=27085) --> (http://bugs.winehq.org/attachment.cgi?id=27085) test whether or not the looked up names are null-terminated
I think i now have pinpointed the problem. MSDN states that the looked up names may or may not be NULL-terminated. In our code for LsaLookUpSids, LookUpAccountSid is called and that always delivers a null-terminated string, so LsaLookUpSids does so too, and the maximumlength and length are always equal in wine's code.
The attached tests show what names on windows are null terminated and which not (only tested a few), so we have to deal with this and distinguish between these , as this bug depends on this.
http://bugs.winehq.org/show_bug.cgi?id=16418
Andrew Nguyen arethusa26@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dorian.grey@mail.com
--- Comment #29 from Andrew Nguyen arethusa26@gmail.com 2010-05-01 16:40:13 --- *** Bug 22547 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #30 from Dorian Grey dorian.grey@mail.com 2010-05-06 03:59:03 --- I originally posted Bug 22547 (a bug with the same error message), got a duplicate and a reference to this bug:
Thus I tried the patch from Comment #28 with Wine 1.1.43. But unfortunatly it did not work (I got the same error message as before).
For testing I used the Open R-Community Tools (http://rcommunity.nazgulworld.com/index.php?page=dl) which also have the source code available (see also Bug 22547). They use the .NET Framework 2.0.
This might be easier than some closed source MS product.
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #31 from Andrew Nguyen arethusa26@gmail.com 2010-05-06 04:03:44 --- Attachment 27085 solely modifies the Wine unit tests, so there is no functional change with it.
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #32 from Andrew Nguyen arethusa26@gmail.com 2010-05-06 04:58:17 --- Attachment 26958 seems to be sufficient to make the Open R-Community Tools work. You'll probably need to use winetricks for native gdiplus in order to work around bug 22277.
http://bugs.winehq.org/show_bug.cgi?id=16418
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase
http://bugs.winehq.org/show_bug.cgi?id=16418
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |warnockm@comcast.net
--- Comment #33 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2010-05-11 18:26:52 --- *** Bug 21703 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=16418
Matej Spindler spindler.matej@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |spindler.matej@gmail.com
--- Comment #34 from Matej Spindler spindler.matej@gmail.com 2010-05-22 06:09:32 --- (In reply to comment #32)
Attachment 26958 [details] seems to be sufficient to make the Open R-Community Tools work. You'll probably need to use winetricks for native gdiplus in order to work around bug 22277.
This also affects a .NET app i'm using (SC2 offline launcher ALin1 v9.6.6 ). Patch from comment #32 gets the app running.
http://bugs.winehq.org/show_bug.cgi?id=16418
--- Comment #35 from Kai Blin kai.blin@gmail.com 2010-05-23 03:10:55 --- (In reply to comment #32)
Attachment 26958 seems to be sufficient to make the Open R-Community Tools
Not sure that's entirely valid, though. I think you should allocate the maximum length now that you've reduced the actual length to be smaller than the maximum length. (Or also reduce the maximum length).
http://bugs.winehq.org/show_bug.cgi?id=16418
Andrew Nguyen arethusa26@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hedon.james@gmail.com
--- Comment #36 from Andrew Nguyen arethusa26@gmail.com 2010-05-27 10:50:25 --- *** Bug 22900 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=16418
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #37 from Alexandre Julliard julliard@winehq.org 2010-06-10 12:37:34 --- Should be fixed by ffb29fd3351f5181a8418de3245753e15dc0119d.
http://bugs.winehq.org/show_bug.cgi?id=16418
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #38 from Alexandre Julliard julliard@winehq.org 2010-06-11 12:50:45 --- Closing bugs fixed in 1.2-rc3.
https://bugs.winehq.org/show_bug.cgi?id=16418
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |ffb29fd3351f5181a8418de3245 | |753e15dc0119d Hardware|Other |x86 OS|other |Linux Severity|major |normal