https://bugs.winehq.org/show_bug.cgi?id=36332
Bug ID: 36332 Summary: Total Commander 8.x: moving files between folders renders them inaccessible (SetNamedSecurityInfo) 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,
might be a dupe of bug 36331 in the end.
Moving files with the well-known 'Total Commander' (my favourite file manager in Linux) leads to inaccessible files.
Before:
--- snip --- $ ls -lsa test* test: total 0 0 drwxrwxr-x. 1 focht focht 14 May 4 14:40 . 0 drwxr-xr-x. 1 focht focht 178 May 4 14:40 .. 0 -rw-rw-r--. 1 focht focht 0 May 4 14:38 org.txt
test2: total 0 0 drwxrwxr-x. 1 focht focht 0 May 4 14:40 . 0 drwxr-xr-x. 1 focht focht 178 May 4 14:40 .. --- snip ---
After moving the file to another folder 'test2' with 'F6 Move':
--- snip --- $ ls -lsa test* test: total 0 0 drwxrwxr-x. 1 focht focht 0 May 4 14:41 . 0 drwxr-xr-x. 1 focht focht 178 May 4 14:40 ..
test2: total 0 0 drwxrwxr-x. 1 focht focht 14 May 4 14:41 . 0 drwxr-xr-x. 1 focht focht 178 May 4 14:40 .. 0 ----------. 1 focht focht 0 May 4 14:38 org.txt --- snip ---
Inaccessible. Whoops.
Relevant part of trace log:
--- snip --- ... 002d:Call advapi32.GetNamedSecurityInfoW(0f4bce88 L"H:\Downloads\test2",00000001,0000000f,0f4bc600,0f4bc5f8,0f4bc5e0,0f4bc5d8,0f4bc5b8) ret=00833d9f 002d:trace:advapi:GetNamedSecurityInfoW L"H:\Downloads\test2" 1 15 0xf4bc600 0xf4bc5f8 0xf4bc5e0 0xf4bc5d8 0xf4bc5b8 002d:trace:ntdll:FILE_CreateFile handle=0xf4bc2c0 access=01020000 name=L"\??\H:\Downloads\test2" objattr=00000040 root=(nil) sec=(nil) io=0xf4bc210 alloc_size=(nil) attr=02000000 sharing=00000007 disp=1 options=00004000 ea=(nil).0x00000000 002d: create_file( access=01020000, attributes=00000040, sharing=00000007, create=1, options=00004000, attrs=02000000, objattr={rootdir=0000,sd={},name=L""}, filename="/home/focht/wine-apps/totalcmd/wineprefix/dosdevices/h:/Downloads/test2" ) 002d: create_file() = 0 { handle=0104 } 002d:trace:ntdll:NtQuerySecurityObject (0x104,0x0000000f,(nil),0x00000000,0xf4bc1ac) 002d: get_security_object( handle=0104, security_info=0000000f ) 002d: get_security_object() = 0 { sd_len=00000094, sd={control=00000014,owner={S-1-5-21-0-0-0-1000},group={S-1-5-32-544},sacl={},dacl={{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=1f01ff,AceFlags=0,Sid={S-1-5-18}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=1f01ff,AceFlags=0,Sid={S-1-5-21-0-0-0-1000}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=1200a9,AceFlags=0,Sid={S-1-1-0}}}} } 002d:trace:ntdll:NtQuerySecurityObject (0x104,0x0000000f,0x36cce0,0x00000094,0xf4bc1a8) 002d: get_security_object( handle=0104, security_info=0000000f ) 002d: get_security_object() = 0 { sd_len=00000094, sd={control=00000014,owner={S-1-5-21-0-0-0-1000},group={S-1-5-32-544},sacl={},dacl={{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=1f01ff,AceFlags=0,Sid={S-1-5-18}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=1f01ff,AceFlags=0,Sid={S-1-5-21-0-0-0-1000}},{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=1200a9,AceFlags=0,Sid={S-1-1-0}}}} } 002d:trace:ntdll:RtlGetDaclSecurityDescriptor (0x36cce0,0xf4bc0ab,0xf4bc5e0,0xf4bc0aa) 002d:trace:ntdll:RtlGetSaclSecurityDescriptor (0x36cce0,0xf4bc0ab,0xf4bc5d8,0xf4bc0aa) 002d: close_handle( handle=0104 ) 002d: close_handle() = 0 002d:Ret advapi32.GetNamedSecurityInfoW() retval=00000000 ret=00833d9f 002d:Call KERNEL32.GetLastError() ret=00415420 002d:Ret KERNEL32.GetLastError() retval=00000000 ret=00415420 002d:Call advapi32.InitializeAcl(091353d0,00000008,00000002) ret=008341b2 002d:trace:ntdll:RtlCreateAcl 0x91353d0 0x00000008 0x00000002 002d:Ret advapi32.InitializeAcl() retval=00000001 ret=008341b2 002d:Call advapi32.SetNamedSecurityInfoW(0f4bc678 L"H:\Downloads\test2\org.txt",00000001,3000000f,0036ccf4,0036cd10,091353d0,091353d0) ret=00834312 002d:trace:advapi:SetNamedSecurityInfoW L"H:\Downloads\test2\org.txt" 1 805306383 0x36ccf4 0x36cd10 0x91353d0 0x91353d0 002d:trace:ntdll:FILE_CreateFile handle=0xf4bc2d0 access=010c0000 name=L"\??\H:\Downloads\test2\org.txt" objattr=00000040 root=(nil) sec=(nil) io=0xf4bc220 alloc_size=(nil) attr=02000000 sharing=00000007 disp=1 options=00004000 ea=(nil).0x00000000 002d: create_file( access=010c0000, attributes=00000040, sharing=00000007, create=1, options=00004000, attrs=02000000, objattr={rootdir=0000,sd={},name=L""}, filename="/home/focht/wine-apps/totalcmd/wineprefix/dosdevices/h:/Downloads/test2/org.txt" ) 002d: create_file() = 0 { handle=0104 } 002d:trace:ntdll:NtSetSecurityObject 0x104 0x3000000f 0xf4bc190 002d:trace:ntdll:RtlGetControlSecurityDescriptor (0xf4bc190,0xf4bc046,0xf4bc048) 002d:trace:ntdll:RtlLengthSid sid=0x36ccf4 002d:trace:ntdll:RtlLengthSid sid=0x36cd10 002d:trace:ntdll:RtlGetSaclSecurityDescriptor (0xf4bc190,0xf4bc04e,0xf4bc060,0xf4bc04f) 002d:trace:ntdll:RtlGetDaclSecurityDescriptor (0xf4bc190,0xf4bc04e,0xf4bc068,0xf4bc04f) 002d: set_security_object( handle=0104, security_info=3000000f, sd={control=00000014,owner={S-1-5-21-0-0-0-1000},group={S-1-5-32-544},sacl={},dacl={}} ) 002d: set_security_object() = 0 002d: close_handle( handle=0104 ) 002d: close_handle() = 0 002d:Ret advapi32.SetNamedSecurityInfoW() retval=00000000 ret=00834312 002d:Call KERNEL32.LocalFree(0036cce0) ret=008344c5 002d:Ret KERNEL32.LocalFree() retval=00000000 ret=008344c5 002d:Call KERNEL32.SetFileAttributesW(0f4c4ec8 L"H:\Downloads\test2\org.txt",00000020) ret=0049312c 002d:trace:ntdll:FILE_CreateFile handle=0xf4c4be8 access=00000000 name=L"\??\H:\Downloads\test2\org.txt" objattr=00000040 root=(nil) sec=(nil) io=0xf4c4bf0 alloc_size=(nil) attr=00000000 sharing=00000000 disp=1 options=00000020 ea=(nil).0x00000000 002d: create_file( access=00000000, attributes=00000040, sharing=00000000, create=1, options=00000020, attrs=00000000, objattr={rootdir=0000,sd={},name=L""}, filename="/home/focht/wine-apps/totalcmd/wineprefix/dosdevices/h:/Downloads/test2/org.txt" ) 002d: create_file() = ACCESS_DENIED { handle=0000 } 002d:Ret KERNEL32.SetFileAttributesW() retval=00000000 ret=0049312c --- snip ---
$ sha1sum tcm851ax32.exe 628ebb878fb8b1f0728217448b5921f42e987899 tcm851ax32.exe
$ du -sh tcm851ax32.exe 3.6M tcm851ax32.exe
$ wine --version wine-1.7.18
Regards
https://bugs.winehq.org/show_bug.cgi?id=36332
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://www.ghisler.com/down | |load.htm
https://bugs.winehq.org/show_bug.cgi?id=36332
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |piotr.caban@gmail.com
--- Comment #1 from Piotr Caban piotr.caban@gmail.com --- It works for me now, please retest.
https://bugs.winehq.org/show_bug.cgi?id=36332
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Fixed by SHA1| |f974d726720eff4fcd7371bca95 | |e6cdcc4b4a848 Status|NEW |RESOLVED Component|-unknown |advapi32 Resolution|--- |FIXED
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
indeed this works now.
Fixed by commit http://source.winehq.org/git/wine.git/commitdiff/f974d726720eff4fcd7371bca95...
Thanks Piotr
Regards
https://bugs.winehq.org/show_bug.cgi?id=36332
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.40.
https://bugs.winehq.org/show_bug.cgi?id=36332
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.ghisler.com/down |https://web.archive.org/web |load.htm |/20191003035605/http://tota | |lcommander.ch/win/old/tcmd8 | |51ax32.exe