[Bug 38417] [EA] Origin self-updater fails to install updates ('kernel32.DeleteFileW' shall only open the file for delete access as callers might not have read/write rights)

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Jul 30 16:22:36 CDT 2015


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

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |focht at gmx.net
          Component|-unknown                    |kernel32
            Summary|[EA] Origin self-updater    |[EA] Origin self-updater
                   |fails to install updates    |fails to install updates
                   |                            |('kernel32.DeleteFileW'
                   |                            |shall only open the file
                   |                            |for delete access as
                   |                            |callers might not have
                   |                            |read/write rights)

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

--- quote ---
a detailed analysis and a suggested patch will come soon.
--- quote ---

It seems the first part got lost ;-)

Adding logs/trace for completeness here.

App log file 'UpdateTool_Log.txt':

--- snip ---
[2015/7/30 20:7:18.508]    Starting ; Update System 2 ; UpdateTool v9.7.2.53208
[2015/7/30 20:7:18.509]    Mutex acquired.
[2015/7/30 20:7:18.509]    Registry operations
[2015/7/30 20:7:18.510]    Setting ProgramData permissions succeeded
[2015/7/30 20:7:18.516]    Origin running at: C:\Program Files
(x86)\Origin\Origin.exe
[2015/7/30 20:7:18.516]    Found Origin folder: C:\Program Files (x86)\Origin\
[2015/7/30 20:7:18.516]    SelfUpdate data location:
C:\users\Public\Application Data\Origin\SelfUpdate\StagedUpdate\
[2015/7/30 20:7:18.521]    Found valid update data.
[2015/7/30 20:7:18.521]    Set origin folder permissions
[2015/7/30 20:7:18.521]    Open permissions for: C:\Program Files (x86)\Origin\
[2015/7/30 20:7:18.521]    Permissions modified successfully.
[2015/7/30 20:7:18.562]    FILE_ATTRIBUTE_ARCHIVE: C:\Program Files
(x86)\Origin\EACore_App.ini. Last error: [32]
[2015/7/30 20:7:18.563]    SetFileAttributes failed.. Last error: [0]
[2015/7/30 20:7:18.563]    Attempting deletion operation: C:\Program Files
(x86)\Origin\EACore_App.ini. Number of times: [1]. Last error: [0]
[2015/7/30 20:7:18.613]    FILE_ATTRIBUTE_ARCHIVE: C:\Program Files
(x86)\Origin\EACore_App.ini. Last error: [32]
[2015/7/30 20:7:18.614]    SetFileAttributes failed.. Last error: [0]
...
[2015/7/30 20:9:53.601]    Attempting deletion operation: C:\Program Files
(x86)\Origin\EACore_App.ini. Number of times: [200]. Last error: [0]
[2015/7/30 20:9:53.653]    Deletion operation FAILED for : C:\Program Files
(x86)\Origin\EACore_App.ini. Number of times: [200]. Last error: [0]
--- snip ---

Relevant part of trace log (+server to make it obvious):

--- snip ---
...
0032:Call KERNEL32.SetFileAttributesW(0042b5b0 L"C:\\Program Files
(x86)\\Origin\\EACore_App.ini",00000080) ret=0040e04a
0032:trace:ntdll:FILE_CreateFile handle=0x33d780 access=00000000
name=L"\\??\\C:\\Program Files (x86)\\Origin\\EACore_App.ini" objattr=00000040
root=(nil) sec=(nil) io=0x33d784 alloc_size=(nil) attr=00000000
sharing=00000000 disp=1 options=00000020 ea=(nil).0x00000000
0032: create_file( access=00000000, attributes=00000040, sharing=00000000,
create=1, options=00000020, attrs=00000000,
objattr={rootdir=0000,sd={},name=L""},
filename="/home/focht/wine-games/wineprefix-ea-origin/dosdevices/c:/Program
Files (x86)/Origin/EACore_App.ini" )
0032: create_file() = 0 { handle=01f8 }
0032:trace:ntdll:NtSetInformationFile
(0x1f8,0x33d784,0x33d758,0x00000028,0x00000004)
0032: get_handle_fd( handle=01f8 )
0032: *fd* 01f8 -> 334
0032: get_handle_fd() = 0 { type=1, cacheable=1, access=00000000,
options=00000020 }
0032: close_handle( handle=01f8 )
0032: close_handle() = 0
0032:Ret  KERNEL32.SetFileAttributesW() retval=00000001 ret=0040e04a
0032:Call KERNEL32.CreateFileW(0042b5b0 L"C:\\Program Files
(x86)\\Origin\\EACore_App.ini",c0000000,00000004,00000000,00000003,00000080,00000000)
ret=0040e09e
0032:trace:ntdll:FILE_CreateFile handle=0x33d718 access=c0000000
name=L"\\??\\C:\\Program Files (x86)\\Origin\\EACore_App.ini" objattr=00000040
root=(nil) sec=(nil) io=0x33d71c alloc_size=(nil) attr=00000080
sharing=00000004 disp=1 options=00000060 ea=(nil).0x00000000
0032: create_file( access=c0000000, attributes=00000040, sharing=00000004,
create=1, options=00000060, attrs=00000080,
objattr={rootdir=0000,sd={},name=L""},
filename="/home/focht/wine-games/wineprefix-ea-origin/dosdevices/c:/Program
Files (x86)/Origin/EACore_App.ini" )
0032: create_file() = 0 { handle=01f8 }
0032:Ret  KERNEL32.CreateFileW() retval=000001f8 ret=0040e09e
...
0032:Call KERNEL32.DeleteFileW(004308c0 L"C:\\Program Files
(x86)\\Origin\\EACore_App.ini") ret=0040bc28
0032:trace:ntdll:FILE_CreateFile handle=0x33d728 access=c0010000
name=L"\\??\\C:\\Program Files (x86)\\Origin\\EACore_App.ini" objattr=00000040
root=(nil) sec=(nil) io=0x33d720 alloc_size=(nil) attr=00000000
sharing=00000007 disp=1 options=00001040 ea=(nil).0x00000000
0032: create_file( access=c0010000, attributes=00000040, sharing=00000007,
create=1, options=00001040, attrs=00000000,
objattr={rootdir=0000,sd={},name=L""},
filename="/home/focht/wine-games/wineprefix-ea-origin/dosdevices/c:/Program
Files (x86)/Origin/EACore_App.ini" )
0032: create_file() = SHARING_VIOLATION { handle=0000 }
0032:Ret  KERNEL32.DeleteFileW() retval=00000000 ret=0040bc28
0032:Call KERNEL32.GetLastError() ret=0040bc3a
0032:Ret  KERNEL32.GetLastError() retval=00000020 ret=0040bc3a
0032:Call KERNEL32.GetFileAttributesW(004308c0 L"C:\\Program Files
(x86)\\Origin\\EACore_App.ini") ret=00409f51
0032:Ret  KERNEL32.GetFileAttributesW() retval=00000020 ret=00409f51
...
0048:Call gdi32.TextOutW(0016002e,00000000,00000180,00148e88 L"Deletion
operation FAILED for : C:\\Program Files (x86)\\Origin\\EACore_App.ini   
\0099",00000050) ret=7ed3f5c5
...
0032:Call KERNEL32.CloseHandle(000001f8) ret=0040e6ca
0032: close_handle( handle=01f8 )
0032: close_handle() = 0
0032:Ret  KERNEL32.CloseHandle() retval=00000001 ret=0040e6ca
...
--- snip ---

$ wine --version
wine-1.7.48-30-g5bd9d58

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