Bug 801496

Summary: mkdumrd does not allow remote dumping if remote user has a restricted shell (rksh)
Product: Red Hat Enterprise Linux 5 Reporter: Subin Francis <sfrancis>
Component: kexec-toolsAssignee: Dave Young <ruyang>
Status: CLOSED ERRATA QA Contact: Guangze Bai <gbai>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.8CC: ccui, chaowang, gbai, rpiddapa, yshao
Target Milestone: rc   
Target Release: 5.9   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kexec-tools-1.102pre-158.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 801497 (view as bug list) Environment:
Last Closed: 2013-01-08 04:09:12 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:
Bug Depends On:    
Bug Blocks: 801497    
Attachments:
Description Flags
Patch to allow network dumps when the remote use is in a restricted shell
none
use dd instead of cat in ssh vmcore saving none

Description Subin Francis 2012-03-08 16:43:28 UTC
Description of problem:
The mkdumprd command creates an init script that doesn't work if the remote user that is being used to receive the dump is configured with a restricted shell (rksh) for one simple reason:  Restricted shell forbids the use of redirection.  

Version-Release number of selected component (if applicable):
Applicable for all versions of versions of kexec-tools shipped with RHEL

How reproducible:
Configure kdump to dump vmcore via ssh, with the remote kdump user configured to use a restricted shell (rksh), and trigger a kernel panic
  
Actual results:
Dumping will fail since restricted shell forbids the use of redirection.

Expected results:
Dumping should work even if the remote user is configured with a restricted shell (rksh)

Comment 3 Martin McGreal 2012-03-08 20:21:45 UTC
Created attachment 568738 [details]
Patch to allow network dumps when the remote use is in a restricted shell

This patch changes the mkdumprd command to use the tee command rather than classic redirection when cat'ing the dump to a file via SSH.  It was tested with kexec-tools-1.102pre-126.el5_6.6.x86_64.

Comment 4 RHEL Program Management 2012-04-02 10:39:25 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 5 Dave Young 2012-07-10 03:28:36 UTC
Created attachment 597202 [details]
use dd instead of cat in ssh vmcore saving

Hi,

Same reason with rhel6 bug 801497, tee will create lots of output to stdout, so we will use "dd of=".

Backport the patch from rhel6

Comment 6 Dave Young 2012-07-10 09:33:14 UTC
Hi, Subin

I uploaded rhel5 srpm and rpms to below url
http://people.redhat.com/ruyang/aa60a46e66f4725af97709df3eb60158/

Could you ask customer to test?

Thanks.

Comment 12 errata-xmlrpc 2013-01-08 04:09:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0012.html