Bug 61080

Summary: new ssh-add exit status breaks compatibility
Product: [Retired] Red Hat Linux Reporter: Joe Harrington <jhmail>
Component: opensshAssignee: Tomas Mraz <tmraz>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: jhmail
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-02-03 12:09:22 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 Joe Harrington 2002-03-13 07:46:19 UTC
Description of Problem:

The exit status of ssh-add in the case of no connection to an authentication
agent changed from 1 to 2 with today's openssh-3.1p1-2 erratum release.  This
breaks compatibility with commercial SSH, where the exit status is still 1. 
Multi-platform scripts, including code in user .login files to start an agent,
break.  Users with home directories on NFS and who login to different platforms
with the same homedir are particularly affected.  This example group includes a
large number (tens of thousands) of university students.  If you want to add
exit codes, ideally follow the codes used by earlier implementations.  At worst,
add codes that do not break what has been done before and that do not conflict
with those used by other implementations.

Version-Release number of selected component (if applicable):

openssh-3.1p1-2

How Reproducible:
always

Steps to Reproduce:
1. ssh-add -l without an agent running
2. echo $?

Actual Results:
2

Expected Results:
1

Additional Information:

From commercial SSH ssh-add2 man page:

     0    The requested operation was performed successfully.

     1    No connection  could  be  made  to  the  authentication
          agent.   Presumably  there  is  no authentication agent
          active in the execution environment of ssh-add2.

     2    The user did not supply a required passphrase.

SSH2               Last change: March 22, 2000                  2

SSH2                                                  SSH-ADD2(1)

     3    An identify file could not be found, was not  readable,
          or was in bad format.

     4    The agent does not have the requested identity.

     5    An unspecified error has occurred; this is a  catch-all
          for errors not listed above.
--jh--

Comment 1 Tomas Mraz 2005-02-03 12:09:22 UTC
There is no promise to be compatible with the commercial ssh in this
regard.