Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 759154 - Script sshd.sh print 0 as error code of some utilities instead of returned code
Script sshd.sh print 0 as error code of some utilities instead of returned code
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor (Show other bugs)
2.1
Unspecified Unspecified
unspecified Severity unspecified
: 2.1.1
: ---
Assigned To: Timothy St. Clair
Daniel Horák
:
Depends On:
Blocks: 765607
  Show dependency treegraph
 
Reported: 2011-12-01 09:36 EST by Daniel Horák
Modified: 2012-02-07 05:14 EST (History)
4 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-06 13:18:22 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0100 normal SHIPPED_LIVE Moderate: MRG Grid security, bug fix, and enhancement update 2012-02-06 18:15:47 EST

  None (edit)
Description Daniel Horák 2011-12-01 09:36:56 EST
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 13:01:47 EST
    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 07:39:26 EST
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 13:18:22 EST
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.