[Bug 21292] New: system call "open" doesn't reject trailing slash in filenames
http://bugs.winehq.org/show_bug.cgi?id=21292 Summary: system call "open" doesn't reject trailing slash in filenames Product: Wine Version: 1.0.1 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msvcrt AssignedTo: wine-bugs(a)winehq.org ReportedBy: simon(a)josefsson.org Here is another test case that triggers gnulib self-tests failures under Wine but not under Windows XP. Under Wine it prints: out 3 but under Windows XP it prints: out -1 which is expected. Thanks, /Simon jas(a)mocca:~$ cat foo.c #include <fcntl.h> #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <stdio.h> int main (void) { int fd = open ("nonexist.ent/", O_CREAT | O_RDONLY, 0600); printf ("out %d\n", fd); return 0; } jas(a)mocca:~$ i586-mingw32msvc-gcc -o foo.exe foo.c jas(a)mocca:~$ wine --version wine-1.0.1 jas(a)mocca:~$ wine ./foo.exe out 3 jas(a)mocca:~$ -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21292 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21292 Andrew Nguyen <arethusa26(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 --- Comment #1 from Andrew Nguyen <arethusa26(a)gmail.com> 2010-01-09 18:27:53 --- I'm confirming with wine-1.1.36. Although native msvcrt doesn't make the test program exhibit the correct behavior on Wine, testing the app on Windows XP confirms the expected behavior. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21292 Jeff Zaroyko <jeffz(a)jeffz.name> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|msvcrt |-unknown --- Comment #2 from Jeff Zaroyko <jeffz(a)jeffz.name> 2010-01-09 18:34:21 --- (In reply to comment #1)
I'm confirming with wine-1.1.36. Although native msvcrt doesn't make the test program exhibit the correct behavior on Wine, testing the app on Windows XP confirms the expected behavior.
Unsetting msvcrt component then. It's likely that because open is implemented with CreateFileW which is subsequently implemented with something in ntdll. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21292 --- Comment #3 from Uwe Bonnes <bon(a)elektron.ikp.physik.tu-darmstadt.de> 2010-01-16 12:58:47 --- Created an attachment (id=25755) --> (http://bugs.winehq.org/attachment.cgi?id=25755) Patch Not sure what to do about it, as NT4 gives different result as all other systems -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21292 --- Comment #4 from Jeff Zaroyko <jeffz(a)jeffz.name> 2010-01-16 16:46:32 --- (In reply to comment #3)
Created an attachment (id=25755) --> (http://bugs.winehq.org/attachment.cgi?id=25755) [details] Patch
Not sure what to do about it, as NT4 gives different result as all other systems
Does that file actually exist after the call succeeds? Have you tested the ntdll api NtCreateFile/NtOpenFile to see if the behavior is actually there rather than in kernel32? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21292 --- Comment #5 from Austin English <austinenglish(a)gmail.com> 2012-06-24 22:38:58 CDT --- Now gives out 4. Still present in 1.5.7. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21292 --- Comment #6 from Austin English <austinenglish(a)gmail.com> 2012-06-24 22:39:20 CDT --- Created attachment 40696 --> http://bugs.winehq.org/attachment.cgi?id=40696 precompiled exe -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
https://bugs.winehq.org/show_bug.cgi?id=21292 --- Comment #7 from Ken Sharp <imwellcushtymelike(a)gmail.com> --- Back to printing 3. Wine 1.7.45. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=21292 Ken Sharp <imwellcushtymelike(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source -- 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.
https://bugs.winehq.org/show_bug.cgi?id=21292 super_man(a)post.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man(a)post.com --- Comment #8 from super_man(a)post.com --- wine 1.8rc1 and wine-staging 1.7.55 both prints 3 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=21292 winetest(a)luukku.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest(a)luukku.com --- Comment #9 from winetest(a)luukku.com --- (In reply to super_man from comment #8)
wine 1.8rc1 and wine-staging 1.7.55 both prints 3
Both wine 2.5-git and wine-staging 2.4 prints 3. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=21292 Martin Storsjö <martin(a)martin.st> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin(a)martin.st --- Comment #10 from Martin Storsjö <martin(a)martin.st> --- Created attachment 69568 --> https://bugs.winehq.org/attachment.cgi?id=69568 Test case based on CreateFileA() I also ran into this (via a testsuite), and I had created a testcase (based on CreateFileA() instead of the CRT open() as tested here) before I found this preexisting bug. -- 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.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla