https://bugs.winehq.org/show_bug.cgi?id=36331
Bug ID: 36331 Summary: Rhapsody 2 installer renders app folder inaccessible (SetNamedSecurityInfo with 'everyone' access) Product: Wine Version: 1.7.18 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net
Hello folks,
found this during investigation of bug 15980
After installation of 'Rhapsody 2', the application folder is inaccessible:
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files
$ ls -lsa total 0 0 drwxrwxr-x. 1 focht focht 128 May 4 14:19 . 0 drwxrwxr-x. 1 focht focht 74 May 4 14:18 .. 0 drwxrwxr-x. 1 focht focht 40 May 4 14:18 Common Files 0 drwxrwxr-x. 1 focht focht 24 May 4 14:18 Internet Explorer 0 d---------. 1 focht focht 318 May 4 14:19 Listen Rhapsody 0 drwxrwxr-x. 1 focht focht 350 May 4 14:18 Windows Media Player --- snip ---
Relevant part of trace log:
--- snip --- $ WINEDEBUG=+tid,+seh,+relay,+server,+ntdll,+advapi wine ./RhapsodyListen.EXE
log.txt 2>&1
... 0030:Call KERNEL32.CreateDirectoryA(0033e504 "C:\Program Files\Listen Rhapsody",00000000) ret=1000c3cb 0030:trace:ntdll:FILE_CreateFile handle=0x33d38c access=80000000 name=L"\??\C:\Program Files\Listen Rhapsody" objattr=00000040 root=(nil) sec=(nil) io=0x33d390 alloc_size=(nil) attr=00000080 sharing=00000001 disp=2 options=00000021 ea=(nil).0x00000000 0030: create_file( access=80000000, attributes=00000040, sharing=00000001, create=2, options=00000021, attrs=00000080, objattr={rootdir=0000,sd={},name=L""}, filename="/home/focht/.wine/dosdevices/c:/Program Files/Listen Rhapsody" ) 0030: create_file() = 0 { handle=00c0 } 0030: close_handle( handle=00c0 ) 0030: close_handle() = 0 0030:Ret KERNEL32.CreateDirectoryA() retval=00000001 ret=1000c3cb 0030:Call KERNEL32.lstrlenA(0033d384 "Made Dir: C:\Program Files\Listen Rhapsody\r\n") ret=1000c41f 0030:Ret KERNEL32.lstrlenA() retval=0000002c ret=1000c41f ... 0030:Ret PE DLL (proc=0x36296d,module=0x360000 L"InstDll.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1 0030:Ret KERNEL32.LoadLibraryA() retval=00360000 ret=10016a0b 0030:Call KERNEL32.GetLastError() ret=10016a17 0030:Ret KERNEL32.GetLastError() retval=00000000 ret=10016a17 0030:Call KERNEL32.GetProcAddress(00360000,0033de64 "fnGiveAllPermissions") ret=10016989 0030:Ret KERNEL32.GetProcAddress() retval=00361e00 ret=10016989 0030:Call KERNEL32.GetLastError() ret=1001698d 0030:Ret KERNEL32.GetLastError() retval=00000000 ret=1001698d ... 0030:Call advapi32.LookupAccountNameA(00000000,0036a300 "Everyone",0033da30,0033da1c,00000000,0033da18,0033da20) ret=00361e34 0030:trace:advapi:LookupAccountNameW L"" L"Everyone" 0x33da30 0x33da1c (nil) 0x33da18 0x33da20 0030:trace:advapi:CreateWellKnownSid (1, (null), 0x1b02b8, 0x33d85c) 0030:Ret advapi32.LookupAccountNameA() retval=00000000 ret=00361e34 0030:Call KERNEL32.GetLastError() ret=00361e40 0030:Ret KERNEL32.GetLastError() retval=0000007a ret=00361e40 0030:Call ntdll.RtlAllocateHeap(00a40000,00000000,00000010) ret=003626e9 0030:Ret ntdll.RtlAllocateHeap() retval=00a409c8 ret=003626e9 0030:Call advapi32.LookupAccountNameA(00000000,0036a300 "Everyone",0033da30,0033da1c,00a409c8,0033da18,0033da20) ret=00361e81 0030:trace:advapi:LookupAccountNameW L"" L"Everyone" 0x33da30 0x33da1c 0x14fb50 0x33da18 0x33da20 0030:trace:advapi:CreateWellKnownSid (1, (null), 0x1b02b8, 0x33d85c) 0030:trace:ntdll:RtlLengthSid sid=0x1b02b8 0030:Ret advapi32.LookupAccountNameA() retval=00000001 ret=00361e81 0030:Call advapi32.GetLengthSid(0033da30) ret=00361ea7 0030:trace:ntdll:RtlLengthSid sid=0x33da30 0030:Ret advapi32.GetLengthSid() retval=0000000c ret=00361ea7 0030:Call ntdll.RtlAllocateHeap(00a40000,00000000,00000020) ret=003626e9 0030:Ret ntdll.RtlAllocateHeap() retval=00a409e0 ret=003626e9 0030:Call advapi32.InitializeAcl(00a409e0,0000001c,00000004) ret=00361ed0 0030:trace:ntdll:RtlCreateAcl 0xa409e0 0x0000001c 0x00000004 0030:Ret advapi32.InitializeAcl() retval=00000001 ret=00361ed0 0030:Call ntdll.RtlAllocateHeap(00a40000,00000000,00000020) ret=003626e9 0030:Ret ntdll.RtlAllocateHeap() retval=00a40a08 ret=003626e9 0030:Call advapi32.GetLengthSid(0033da30) ret=00361efb 0030:trace:ntdll:RtlLengthSid sid=0x33da30 0030:Ret advapi32.GetLengthSid() retval=0000000c ret=00361efb 0030:Call advapi32.AddAce(00a409e0,00000004,00000000,00a40a08,00000014) ret=00361f39 0030:Ret advapi32.AddAce() retval=00000000 ret=00361f39 0030:Call KERNEL32.GetLastError() ret=00361f45 0030:Ret KERNEL32.GetLastError() retval=00000057 ret=00361f45 0030:Call advapi32.SetNamedSecurityInfoA(005595d8 "C:\PROG~FBU\LIST~R1R",00000001,00000004,00000000,00000000,00a409e0,00000000) ret=00361f6d 0030:trace:advapi:SetNamedSecurityInfoA "C:\PROG~FBU\LIST~R1R" 1 4 (nil) (nil) 0xa409e0 (nil) 0030:trace:advapi:SetNamedSecurityInfoW L"C:\PROG~FBU\LIST~R1R" 1 4 (nil) (nil) 0xa409e0 (nil) 0030:trace:ntdll:FILE_CreateFile handle=0x33d8d4 access=00040000 name=L"\??\C:\PROG~FBU\LIST~R1R" objattr=00000040 root=(nil) sec=(nil) io=0x33d864 alloc_size=(nil) attr=02000000 sharing=00000007 disp=1 options=00004000 ea=(nil).0x00000000 0030: create_file( access=00040000, attributes=00000040, sharing=00000007, create=1, options=00004000, attrs=02000000, objattr={rootdir=0000,sd={},name=L""}, filename="/home/focht/.wine/dosdevices/c:/Program Files/Listen Rhapsody" ) 0030: create_file() = 0 { handle=00e0 } 0030:trace:ntdll:NtSetSecurityObject 0xe0 0x00000004 0x33d850 0030:trace:ntdll:RtlGetControlSecurityDescriptor (0x33d850,0x33d7ce,0x33d7d0) 0030:trace:ntdll:RtlGetDaclSecurityDescriptor (0x33d850,0x33d7d6,0x33d7e4,0x33d7d7) 0030: set_security_object( handle=00e0, security_info=00000004, sd={control=00000004,owner=<not present>,group=<not present>,sacl={},dacl={}} ) 0030: set_security_object() = 0 0030: close_handle( handle=00e0 ) 0030: close_handle() = 0 0030:Ret advapi32.SetNamedSecurityInfoA() retval=00000000 ret=00361f6d --- snip ---
$ sha1sum RhapsodyListen.EXE 68537f385af4927e6e771e8dac1a4476de147724 RhapsodyListen.EXE
$ du -sh RhapsodyListen.EXE 2.1M RhapsodyListen.EXE
$ wine --version wine-1.7.18-10-ge5d69df
Regards