• rtxn@lemmy.worldM
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    22 hours ago

    Thanks, that’s even more fucked up.

    What’s even even more fucked up is that the package still installs an executable to /usr/bin/firefox, but it’s just a wrapper script that launches the Snap application… and also replaces your desktop shortcuts, application launcher shortcuts, and favourites with its own Reforged Edition file if you’re running GNOME, Unity, MATE, or KDE Plasma.

    Excerpt from /usr/bin/firefox Canonical Edition(TM)
    # [...]
    
    # GNOME Shell
    OLD="firefox.desktop"
    NEW="firefox_firefox.desktop"
    FAVS=$(gsettings get org.gnome.shell favorite-apps 2> /dev/null)
    if echo "$FAVS" | grep -q "'$OLD'"; then
      NEWFAVS=$(echo $FAVS | sed -e "s#'$OLD'#'$NEW'#")
      gsettings set org.gnome.shell favorite-apps "$NEWFAVS"
    fi
    
    # MATE
    OLD="/usr/share/applications/firefox.desktop"
    NEW="/var/lib/snapd/desktop/applications/firefox_firefox.desktop"
    OBJECTS=$(gsettings get org.mate.panel object-id-list 2> /dev/null)
    for object in $OBJECTS; do
      object=$(echo $object | cut -d\' -f2)
      launcher=$(gsettings get org.mate.panel.object:/org/mate/panel/objects/$object/ launcher-location)
      if [ "$launcher" = "'$OLD'" ]; then
        gsettings set org.mate.panel.object:/org/mate/panel/objects/$object/ launcher-location "'$NEW'"
      fi
    done
    
    # [...]
    
    # TODO: handle other desktop environments
    
    exec /snap/bin/firefox "$@"
    

    I’d classify that as malware.