Bug 25307 - [patch] `/sbin/pidof: -c: line 2: syntax error: unexpected end of file
[patch] `/sbin/pidof: -c: line 2: syntax error: unexpected end of file
Product: Red Hat Linux
Classification: Retired
Component: kdebase (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Aaron Brown
Florence RC-1
Depends On:
  Show dependency treegraph
Reported: 2001-01-30 11:09 EST by Tim Waugh
Modified: 2007-04-18 12:30 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-02-06 13:19:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
kdelibs-esc.patch (1.28 KB, patch)
2001-01-31 10:37 EST, Tim Waugh
no flags Details | Diff

  None (edit)
Description Tim Waugh 2001-01-30 11:09:45 EST
There is an error message in .xsession-errors after logging in.  It is due
to the Exec line in Autorun.kdelnk not getting properly expanded:

[pid  1982] execve("/bin/bash", ["bash", "-c", "if test -O /dev/console -a
-z \\", "`/sbin/pidof", "autorun`\\\"", "-a", "-x",
"/usr/bin/autorun;then", "/usr/bin/autorun", "--interval=1000",
"--cdplayer=/usr/bin/kscd", "&", "fi\""], [/* 29 vars */]) = 0

There are more parameters than there should be here; I guess the
word-splitting code is confused by the double quote.  Is it using wordexp
(and if not why not)?
Comment 1 Glen Foster 2001-01-30 15:43:25 EST
This defect is considered MUST-FIX for Florence Release-Candidate #1
Comment 2 Tim Waugh 2001-01-30 18:12:13 EST
There's some _very_ suspicious code in KRun::shellQuote that could be the cause
of it.

I've ranted about this in another bug, but here's how Exec= lines _ought_ to be

Replace %x with ${x} for each type of x replacement.  Set up the environment
appropriately to reflect this.  Call wordexp.  Be happy.

This will do quoting for you, and tilde expansion, and parameter expansion, and
arithmetic expansion, and even command substitution if you want (optional).
Comment 3 Tim Waugh 2001-01-31 10:37:04 EST
Created attachment 8562 [details]
Comment 4 Tim Waugh 2001-01-31 10:40:54 EST
The above patch fixes this behaviour for me.  KDE should just use wordexp. ;-)

Now autorun actually starts, and prompts me for the root password when I put a
Red Hat Linux CD in the drive.  Woohoo!
Comment 5 Bernhard Rosenkraenzer 2001-02-01 14:56:16 EST
Fixed in CVS.
Comment 6 Tim Waugh 2001-02-06 12:40:20 EST
20010205 package still has this bug.  Is the patch applied?
Comment 7 Bernhard Rosenkraenzer 2001-02-06 13:10:52 EST
Yes, the patch is in and applied.
It's Patch #3 in the current kdelibs source RPM.
Comment 8 Bernhard Rosenkraenzer 2001-02-06 13:18:57 EST
Found the problem... is_escaped isn't set in PARSE_DBLQUOTED mode.


Comment 9 Bernhard Rosenkraenzer 2001-02-06 13:29:19 EST
Fixed in 20010206

Note You need to log in before you can comment on or make changes to this bug.