qdbus check is wrong in startkde

Bug #1306086 reported by Matteo Croce
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kde-workspace (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

In the beginning of /usr/bin/startkde there is a check to assure that qdbus can be called.
A variable is set like this:

qdbus=QT_SELECT=qt4 qdbus

and later there is the real check:

if $qdbus >/dev/null 2>/dev/null; then
    : # ok
else

unfortunately this is completely wrong, the variable assignment would call qdbus directly with a wrong "qdbus=QT_SELECT=qt4" environment variable,
because the first unquoted space after a variable assignment separated the environment from the command line to start
as explained in the BASH bible: http://www.tldp.org/LDP/abs/html/varsubn.html#EX9, example:

GIT_DIR=/usr/src/repo/.git git status

Indeed, if I make qdbus non executable (or if I remove it) like `chmod 000 /usr/bin/qdbus` startkde would not complain as it should do.

This because the check `if $qdbus >/dev/null 2>/dev/null; then` is always true as "$qdbus" evaluates to "qdbus=QT_SELECT=qt4" without "qdbus" and an assignment is always succesfull in shell.

This bug was introduced when trying to fix https://bugs.launchpad.net/ubuntu/+source/kde-workspace/+bug/1304805

Revision history for this message
Harald Sitter (apachelogger) wrote :

fixed by 4:4.11.8-0ubuntu6, currently building the proposed pocket.

Changed in kde-workspace (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.