Bug 759154 - Script sshd.sh print 0 as error code of some utilities instead of returned code
Summary: Script sshd.sh print 0 as error code of some utilities instead of returned code
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor
Version: 2.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 2.1.1
: ---
Assignee: Timothy St. Clair
QA Contact: Daniel Horák
URL:
Whiteboard:
Depends On:
Blocks: 765607
TreeView+ depends on / blocked
 
Reported: 2011-12-01 14:36 UTC by Daniel Horák
Modified: 2012-02-07 10:14 UTC (History)
4 users (show)

Fixed In Version: condor-7.6.5-0.10
Doc Type: Bug Fix
Doc Text:
C: Cause sshd.sh to fail to execute C: Script prints a 0 for all error conditions F: Update the script to output the correct error code R: sshd.sh displays the correct error codes during failure conditions.
Clone Of:
Environment:
Last Closed: 2012-02-06 18:18:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0100 0 normal SHIPPED_LIVE Moderate: MRG Grid security, bug fix, and enhancement update 2012-02-06 23:15:47 UTC

Description Daniel Horák 2011-12-01 14:36:56 UTC
Description of problem:
In script /usr/libexec/condor/sshd.sh is few snippets of code like this:

  $KEYGEN -q -f $hostkey -t rsa -N '' 
  if [ $? -ne 0 ]
  then
    echo ssh keygenerator $KEYGEN returned error $? exiting
    exit -1
  fi

Problem is on line with 'echo' command because exit code in $? is not from command '$KEYGEN -q...' but from test '[' command in 'if' condition.

Version-Release number of selected component (if applicable):
condor-7.6.5-0.8.el5.i386

How reproducible:
100%

Actual results:
When command in $KEYGEN (or other in similar) fails, printed error code is 0.

Expected results:
When command in $KEYGEN (or other in similar) fails, printed error code is correct.

Comment 2 Timothy St. Clair 2011-12-14 18:01:47 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
C: Cause sshd.sh to fail to execute
C: Script prints a 0 for all error conditions
F: Update the script to output the correct error code
R: sshd.sh displays the correct error codes during failure conditions.

Comment 6 Daniel Horák 2012-01-10 12:39:26 UTC
Verified on RHEL 5.7 and RHEL 6.2 on both platforms (i386 and x86_64) on condor-7.6.5-0.11.

>>>VERIFIED

Comment 7 errata-xmlrpc 2012-02-06 18:18:22 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/RHSA-2012-0100.html


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