Bug 55686

Summary: stop of service fails
Product: [Retired] Red Hat Linux Reporter: Itai Nahshon <itai.nahshon>
Component: vncAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: low Docs Contact:
Priority: low    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-11-05 14:21:24 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:

Description Itai Nahshon 2001-11-04 22:47:57 UTC
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 14:13:25 UTC
You're right.  Thanks for the report.  I'm building a fixed package.


Comment 2 Tim Waugh 2001-11-07 09:47:51 UTC
Fixed in 3.3.3r2-22.