Bug 25307

Summary: [patch] `/sbin/pidof: -c: line 2: syntax error: unexpected end of file
Product: [Retired] Red Hat Linux Reporter: Tim Waugh <twaugh>
Component: kdebaseAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: Florence RC-1
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-02-06 18:19:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
kdelibs-esc.patch none

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