http://bugs.winehq.org/show_bug.cgi?id=10974
Summary: wine prefers loopback devices over regular files Product: Wine Version: CVS/GIT Platform: Other OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-kernel AssignedTo: wine-bugs@winehq.org ReportedBy: rmh@aybabtu.com
Created an attachment (id=9920) --> (http://bugs.winehq.org/attachment.cgi?id=9920) fix loopback handling
When using a loopback device as a wine drive, wine will prefer to use the loopback device (e.g. /dev/loop0) for volume access rather than the regular file it's based on (e.g. ~/foo.iso).
From dlls/ntdll/directory.c:
else if (!stat( entry->mnt_fsname, &st ) && S_ISREG(st.st_mode)) { /* if device is a regular file check for a loop mount */ if ((device = strstr( entry->mnt_opts, "loop=" ))) { char *p = strchr( device + 5, ',' ); if (p) *p = 0; return device + 5; } }
I'm not sure if this has any advantage, but it has a big inconvenient. It's almost certain that /dev/loop0 is owned by root and not world-readable, and it's also mostly certain that wine isn't being run as root. If the image is user-owned, by using the loop device we lose the ability to read it.
This typicaly causes breakage that is difficult to figure out. For example, see http://appdb.winehq.org/objectManager.php?sClass=version&iId=727&iTe...
Note: I'm filing this separate from bug 10957 because it's an unrelated issue. The patch I'm attaching here collides with the one I sent for bug 10957, but takes both situations into account.