Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 117785 - Wine creates a file association for .exe files
Summary: Wine creates a file association for .exe files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High trivial (vote)
Assignee: Wine Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-04 13:54 UTC by Dima Ryazanov
Modified: 2006-01-05 14:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dima Ryazanov 2006-01-04 13:54:59 UTC
Wine creates a /usr/share/applications/wine.desktop file, making itself the default program to open Windows executables. This may seem convenient, but it is a security hole: it makes it easy to run an arbitrary .exe, such as email attachments.
In fact, it is even worse than in Windows programs such as Outlook Express, since KDE and Gnome (and possibly other) programs don't know about .exe's and expect a viewer, not an interpreter, for the given file. All other file types seem to have relatively safe associations. For example, shell scripts have a text editor as an association, not the shell; .jar files are opened with an archive viewer, and not "java -jar". And no one would make /lib/ld-linux.so.2 a file association for Linux binaries.

A much better solution would be to respect UNIX permissions, and only run files marked executable. In Linux, it can be done using binfmt_misc. Just add this entry to /etc/sysctl.conf:
fs.binfmt_misc.register = :WINEXE:M::MZ::/usr/bin/wine:
This way, it will even be possible to run .exe's directly, e.g. "./program.exe", instead of "wine program.exe".
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-01-04 14:07:01 UTC
(In reply to comment #0)
> . This may seem convenient, but it is a security hole:it makes it easy to run an > arbitrary .exe, such as email attachments.

Scratching my head about what harm can W32 .exe (even a virus) possibly do on Linux... :P
Comment 2 SpanKY gentoo-dev 2006-01-04 18:59:35 UTC
(In reply to comment #0)
> And no one would make /lib/ld-linux.so.2 a file association for Linux
> binaries.

this is a bogus example, that isnt how ELF's work

anyways, should be fixed in all ebuilds