← Back to team overview

openjdk team mailing list archive

Bug#785283: openjdk-7-jre: Lost desktop file for running jar files in stable upgrade

 

> Since the upgrade of openjdk-7-jre from 7u75-2.5.4-2 to version
> 7u79-2.5.5-1~deb8u1 this morning, my computer refuse to start the
> Minecraft JAR file.  I tracked it down to the fact that
>
>   /usr/share/applications/openjdk-7-java.desktop
>
> is no longer present in the binary package.  I find this chnagelog entry
> in 7u79-2.5.5-1, which seem relevant.  But I do not understand what it
> mean, and I did not understand when it would trigger.
>
>   * Only install the openjdk-java.desktop file when using cautious-launcher.
>
> Please change the binary to include the java desktop file again.

the security team asked not to open arbitrary jar files, therefore the removal. Ubuntu ships cautious-launcher in the mime-support package, so maybe this is something to implement for Debian as well.

#!/bin/bash
# For use with .desktop files and MIME handlers so that the Ubuntu Policy
# can be followed: programs cannot be executed when they lack the execute bit.
# https://wiki.ubuntu.com/SecurityTeam/Policies#Execute-Permission%20Bit%20Required
exe="$1"
shift || true
if [ -n "$exe" ] && [ ! -x "$exe" ] && \
   [ "${exe:0:5}" != "/usr/" ] && [ "${exe:0:5}" != "/opt/" ]
then
    if [ -n "$DISPLAY" ] && [ -x /usr/bin/zenity ]; then
/usr/bin/zenity --error --title "Blocked: $*" --text "The file '$exe' is not marked as executable. If this was downloaded or copied from an untrusted source, it may be dangerous to run. For more details, read about the <a href=\"https://wiki.ubuntu.com/Security/ExecutableBit\";>executable bit</a>."
    else
        echo "$*: '$exe' is not executable.  Aborting." >&2
    fi
    exit 1
fi
exec "$@" "$exe"