[Bug 36001] Dragon NaturallySpeaking 12.5: 'DragonSvc' service installation fails (services running in context of the 'LocalSystem' account must use SECURITY_LOCAL_SYSTEM_RID user sid)

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Apr 15 16:34:47 CDT 2014


https://bugs.winehq.org/show_bug.cgi?id=36001

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |focht at gmx.net
          Component|ntdll                       |-unknown
            Summary|Dragon NaturallySpeaking    |Dragon NaturallySpeaking
                   |12.5 64-bit does not run    |12.5: 'DragonSvc' service
                   |with ntdll error            |installation fails
                   |                            |(services running in
                   |                            |context of the
                   |                            |'LocalSystem' account must
                   |                            |use
                   |                            |SECURITY_LOCAL_SYSTEM_RID
                   |                            |user sid)
     Ever confirmed|0                           |1

--- Comment #4 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

confirming.

>From the attached log (BTW please don't use text type for .tar.bz2
attachments):

--- snip ---
...
0009:Call advapi32.RegOpenKeyExW(000001b8,01374330
L"{dd100002-6205-11cf-ae61-0000e8a28647}",00000000,00000001,0032da50)
ret=220ecaea
0009:Ret  advapi32.RegOpenKeyExW() retval=00000002 ret=220ecaea
0009:Call advapi32.RegCloseKey(000001b8) ret=220ecaf8
0009:Ret  advapi32.RegCloseKey() retval=00000000 ret=220ecaf8 
...
0009:Call KERNEL32.WideCharToMultiByte(0000fde9,00000000,0032cbf8 L"07:35:30
Exception thrown (E:\\work\\1200relmob\\shared\\fixguid.cpp, 918).\r\n07:35:30
\r\n`\0011\54e2\7bca\d1c82\7e32\f739\d1f02\54e2\7bca\0001",00000054,0032bea0,00000d55,00000000,00000000)
ret=78ae01fc
0009:Ret  KERNEL32.WideCharToMultiByte() retval=00000054 ret=78ae01fc
...
0009:Call KERNEL32.RaiseException(e06d7363,00000001,00000003,0032dc34)
ret=78ac872d 
...
0009:Call KERNEL32.WideCharToMultiByte(0000fde9,00000000,0032cbf8 L"07:35:30
Exception thrown (E:\\work\\1200relmob\\shared\\fixguid.cpp, 918).\r\n07:35:30
\r\n`\0011\54e2\7bca\d1c82\7e32\f739\d1f02\54e2\7bca\0001",00000054,0032bea0,00000d55,00000000,00000000)
ret=78ae01fc 
...
0009:Call KERNEL32.WideCharToMultiByte(0000fde9,00000000,0032a288 L"07:35:30
WARNING: An error dialog is suppressed: A serious error occurred, which
prevents NaturallySpeaking from accessing the
registry.\r\n",0000008a,00329530,00000d55,00000000,00000000) ret=78ae01fc 
--- snip ---

COM server registration info is missing from registry.
Looks like some things went wrong during installation, leaving a broken app.

Additionally:

--- snip ---
0009:Call KERNEL32.WideCharToMultiByte(0000fde9,00000000,0032cf90 L"07:35:26
OS: Windows 8 build 9200 ( )
64-bit\r\n\000f",0000002e,0032c238,00000d55,00000000,00000000) ret=78ae01fc 
--- snip ---

Is there a reason you have set WINEPREFIX 'WinVer' set to 'Windows 8'?
Changing the default reported Windows version to latest doesn't automatically
make Wine better.
It affects how the app works and often does more harm than good (tries to call
new/unimplemented APIs).

Unless there is no strict requirement from the installer itself, please don't
change the default version.
If the installer requires a higher version, select the lowest required one.

Additionally, using 64-bit WINEPREFIX/WoW64 could result in (silently) broken
components, especially .NET Frameworks and stuff that relies on proper
32-bit/64-bit MSI server separation.
Use at own risk.

--

Anyway, I found a torrent with DNS 12.5 and could reproduce some installer
problem with a clean 32-bit WINEPREFIX and default 'WinVer' set to 'Windows
XP'.

The installation part where a failure is reported, extracted from
'dgnsetup.log' in user 'temp' folder:

--- snip ---
...
1: Invoking script function ActivateDragonService 2:  
Script Info: 21:41:11: MSI property retrieved successfully:
'COMMONFILES_NUANCE=C:\Program Files\Common Files\Nuance\'.
Script Info: 21:41:11: Starting child application: C:\Program Files\Common
Files\Nuance\DgnSvc.exe /install
...  
1: Invoking script function SetPeriodicTasks 2:  
Script Info: 21:41:11: MSI property retrieved successfully:
'TARGETDIR=C:\Program Files\Nuance\NaturallySpeaking12\'.
Script Info: 21:41:11: MSI property retrieved successfully:
'PERIODIC_TASK=aco|lmo|dc'.
Script ERROR: 21:41:11: Unable to configure periodic task(s) as specified by
the following parameter. You will be able to configure the tasks manually after
the installation using Administrative Settings dialog.
Error: -2147221164
'aco|lmo|dc'
1: CallScriptFunctionFromMsiCA() ends 2:   
--- snip ---

The service install can be manually executed afterwards for analysis.

Relevant part of trace log:

--- snip ---
$ pwd
/home/focht/.wine/drive_c/Program Files/Common Files/Nuance

$ WINEDEBUG=+tid,+seh,+relay,+ole,+variant,+advapi,+server wine ./dgnsvc.exe
/install >>log.txt 2>&1
...
0009:Ret  advapi32.OpenSCManagerW() retval=00135ff8 ret=0040642c
0009:Call advapi32.OpenServiceW(00135ff8,00436f7c L"DragonSvc",00000014)
ret=0040645d 
...
0009:Ret  advapi32.OpenServiceW() retval=00139f10 ret=0040645d
...
0009:Call advapi32.StartServiceW(00139f10,00000000,00000000) ret=00406499 
...
0018:Call KERNEL32.CreateProcessW(00000000,0011b058 L"C:\\Program Files\\Common
Files\\Nuance\\dgnsvc.exe",00000000,00000000,00000000,00000400,00540000,00000000,0084e4c8,0084e50c)
ret=7edb7d84 
...
0032:Call advapi32.OpenProcessToken(ffffffff,00000008,0033fd94) ret=0040d729
0032:trace:ntdll:NtOpenProcessTokenEx
(0xffffffff,0x00000008,0x00000000,0x33fd94)
0032: open_token( handle=ffffffff, access=00000008, attributes=00000000,
flags=00000000 )
0032: open_token() = 0 { token=0048 }
0032:Ret  advapi32.OpenProcessToken() retval=00000001 ret=0040d729
0032:Call
advapi32.AllocateAndInitializeSid(0033fda0,00000001,00000012,00000000,00000000,00000000,00000000,00000000,00000000,00000000,0033fd9c)
ret=0040d75b
0032:trace:ntdll:RtlAllocateAndInitializeSid (0x33fda0,
0x0001,0x00000012,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x33fd9c)
0032:Ret  advapi32.AllocateAndInitializeSid() retval=00000001 ret=0040d75b
0032:Call
advapi32.GetTokenInformation(00000048,00000001,00000000,00000000,0033fd98)
ret=0040d77a
0032:trace:advapi:GetTokenInformation (0x48, TokenUser, (nil), 0, 0x33fd98):
0032:trace:ntdll:NtQueryInformationToken (0x48,1,(nil),0,0x33fd98)
0032: get_token_sid( handle=0048, which_sid=00000001 )
0032: get_token_sid() = BUFFER_TOO_SMALL { sid_len=28<invalid sid> }
0032:Ret  advapi32.GetTokenInformation() retval=00000000 ret=0040d77a
0032:Call KERNEL32.GetLastError() ret=0040d784
0032:Ret  KERNEL32.GetLastError() retval=0000007a ret=0040d784
0032:Call ntdll.RtlAllocateHeap(00460000,00000000,00000024) ret=00419639
0032:Ret  ntdll.RtlAllocateHeap() retval=00461ee0 ret=00419639
0032:Call
advapi32.GetTokenInformation(00000048,00000001,00461ee0,00000024,0033fd98)
ret=0040d7aa
0032:trace:advapi:GetTokenInformation (0x48, TokenUser, 0x461ee0, 36,
0x33fd98):
0032:trace:ntdll:NtQueryInformationToken (0x48,1,0x461ee0,36,0x33fd98)
0032: get_token_sid( handle=0048, which_sid=00000001 )
0032: get_token_sid() = 0 { sid_len=28, sid={S-1-5-21-0-0-0-1000} }
0032:Ret  advapi32.GetTokenInformation() retval=00000001 ret=0040d7aa
0032:Call advapi32.EqualSid(001383c8,00461ee8) ret=0040d7bc
0032:Ret  advapi32.EqualSid() retval=00000000 ret=0040d7bc
0032:Call ntdll.RtlFreeHeap(00460000,00000000,00461ee0) ret=0041969e
0032:Ret  ntdll.RtlFreeHeap() retval=00000001 ret=0041969e
0032:Call advapi32.FreeSid(001383c8) ret=0040d7d8
0032:trace:ntdll:RtlFreeSid (0x1383c8)
0032:Ret  advapi32.FreeSid() retval=00000000 ret=0040d7d8
0032:Call KERNEL32.CloseHandle(00000048) ret=0040d7e4
0032: close_handle( handle=0048 )
0032: close_handle() = 0 
...
0009:Ret  advapi32.StartServiceW() retval=00000000 ret=00406499
...
0009:Call user32.wvsprintfW(004491d8,00436f28 L"Error: Failed to start \"%s\"
service - %s.",0033f700) ret=0040ded3 
Error: Failed to start "DragonSvc" service - <unknown>.
--- snip ---

The process checks if it runs in the context of the 'LocalSystem' account
(inherits the security context of the SCM) and only then tries to act as
service by calling 'StartServiceCtrlDispatcher'.

The user SID is created from the SECURITY_LOCAL_SYSTEM_RID value (= not
associated with any logged-on user account).
Unfortunately the user SID for this service process is .. the (logged on) user
SID.

$ wine --version
wine-1.7.16-178-g7e874ae

Regards

-- 
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