Comment 19 for bug 313439

Revision history for this message
Jan Minář (rdancer) wrote : Re: [Bug 313439] Re: Opening a Java Archive (.JAR) file executes it regardless of the "executable" permission bit

On Tue, May 5, 2009 at 00:55, Scott Ritchie <email address hidden> wrote:
> My proposal here is to do the same thing I'm experimenting with for
> Wine: have the mime type associate with a new application that checks
> for the execute bit - if it's there it's passed normally, and if it's
> not the user gets a "run (and set execute bit) vs cancel" prompt.

I agree that an association with a simple script which checks for the
execute bit sounds like a good idea. How do you deal with the race
condition when the file is changed after the executable bit is
checked, and before the file would be executed?

The special execute bit is a feature: random files downloaded from the
Internet have to be granted the execute privilege, explicitly, before
they can execute, and do any damage. Furthermore, there is a
perfectly valid open operation, which is opening the JAR with the
Archive Manager. Executing is accessible via the context menu.

Jan.