Bug 55686 - stop of service fails
stop of service fails
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: vnc (Show other bugs)
7.2
i686 Linux
low Severity low
: ---
: ---
Assigned To: Tim Waugh
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-04 17:47 EST by Itai Nahshon
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-11-05 09:21:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Itai Nahshon 2001-11-04 17:47:57 EST
Description of Problem:
stop of vnc service fails if vnc users (defined in
/etc/sysconfig/vncservers) use other shells (eg. tcsh).

Version-Release number of selected component (if applicable):
vnc-server-3.3.3r2-18

Steps to Reproduce:
1.create user with default shell = /bin/tcsh
2.create vnc account for this user (in /etc/sysconfig/vncservers).
3.set vnc password for user.
4.run "/etc/rc.d/init.d/vncserver start"
5.run "/etc/rc.d/init.d/vncserver stop"

Actual Results:
Shutting down VNC server: 10:itai Ambiguous output redirect.
                                                    [FAILED]


Expected Results:
Shutting down VNC server: 10:itai [  OK  ]

Additional Information:
This is because in /etc/rc.d/init.d/vncserver
(line 46)
"su ${display##*:} -c \"vncserver -kill :${display%%:*} >/dev/null 2>&1\""

The redirect to /dev/null is done on the user's shell. That's OK
if the user is using bask (or sh or ksh) but wrong for users that
run tcsh.

Easy workaround:
Change above line to:
"su ${display##*:} -c \"vncserver -kill :${display%%:*}\" >/dev/null 2>&1"
(that will take the redirection out of the arg to su -c. The redirection 
will be done on the caller's shell which is /bin/bash).
Comment 1 Tim Waugh 2001-11-05 09:13:25 EST
You're right.  Thanks for the report.  I'm building a fixed package.
Comment 2 Tim Waugh 2001-11-07 04:47:51 EST
Fixed in 3.3.3r2-22.

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