Bug 25307 - [patch] `/sbin/pidof: -c: line 2: syntax error: unexpected end of file
Summary: [patch] `/sbin/pidof: -c: line 2: syntax error: unexpected end of file
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kdebase
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Aaron Brown
URL:
Whiteboard: Florence RC-1
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-30 16:09 UTC by Tim Waugh
Modified: 2007-04-18 16:30 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-02-06 18:19:01 UTC
Embargoed:


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

Description Tim Waugh 2001-01-30 16:09:45 UTC
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 20:43:25 UTC
This defect is considered MUST-FIX for Florence Release-Candidate #1

Comment 2 Tim Waugh 2001-01-30 23:12:13 UTC
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
expanded:

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 15:37:04 UTC
Created attachment 8562 [details]
kdelibs-esc.patch

Comment 4 Tim Waugh 2001-01-31 15:40:54 UTC
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 19:56:16 UTC
Fixed in CVS.


Comment 6 Tim Waugh 2001-02-06 17:40:20 UTC
20010205 package still has this bug.  Is the patch applied?

Comment 7 Bernhard Rosenkraenzer 2001-02-06 18:10:52 UTC
Yes, the patch is in and applied.
It's Patch #3 in the current kdelibs source RPM.


Comment 8 Bernhard Rosenkraenzer 2001-02-06 18:18:57 UTC
Found the problem... is_escaped isn't set in PARSE_DBLQUOTED mode.

Fixing.



Comment 9 Bernhard Rosenkraenzer 2001-02-06 18:29:19 UTC
Fixed in 20010206



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