Bug 2792

Summary: regress/authinfo.sh fails when tester's login shell is not /bin/sh or compatible
Product: Portable OpenSSH Reporter: Taketo Kabe <openssh>
Component: Regression testsAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: normal CC: djm
Priority: P5    
Version: 7.6p1   
Hardware: ix86   
OS: NetBSD   
Attachments:
Description Flags
patch for authinfo.sh none

Description Taketo Kabe 2017-10-08 19:15:59 AEDT
Created attachment 3065 [details]
patch for authinfo.sh

In regression tests, regress/authinfo.sh assumes that
tester's login shell is /bin/sh or compatible.
The test tries
    ssh 127.0.0.1 'test -z "$SSH_USER_AUTH"'
but this will always fail when tester's login shell is /bin/csh,
emitting "SSH_USER_AUTH: Undefined variable.".

The attached patch will explicitly invoke "sh -c '....'",
which fixed the problem.
Comment 1 Damien Miller 2018-04-06 14:04:39 AEST
We fixed this (twice!) before 7.7 was released. The current code looks like:

env SSH_USER_AUTH=blah ${SSH} -F $OBJ/ssh_proxy x \
        'env | grep SSH_USER_AUTH >/dev/null' && fail "SSH_USER_AUTH present"
Comment 2 Damien Miller 2021-04-23 15:01:28 AEST
closing resolved bugs as of 8.6p1 release