]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
fix key-options.sh on platforms without openpty(3)
authorDamien Miller <djm@mindrot.org>
Fri, 11 May 2018 04:04:40 +0000 (14:04 +1000)
committerDamien Miller <djm@mindrot.org>
Fri, 11 May 2018 04:04:40 +0000 (14:04 +1000)
Skip the pty tests if the platform lacks openpty(3) and has to chown(2)
the pty device explicitly. This typically requires root permissions that
this test lacks.

bz#2856 ok dtucker@

regress/key-options.sh

index d680737c168b3f8cadc559d028086d11c33ffaf8..78d1adc770832d0ed87ebf4256e008da9f7a67ac 100644 (file)
@@ -27,6 +27,7 @@ expect_pty_succeed() {
        rm -f $OBJ/data
        sed "s/.*/$opts &/" $origkeys >$authkeys
        verbose "key option pty $which"
+       config_defined HAVE_OPENPTY || verbose "skipped for no openpty(3)"
        ${SSH} -ttq -F $OBJ/ssh_proxy somehost "tty > $OBJ/data; exit 0"
        if [ $? -ne 0 ] ; then
                fail "key option failed $which"
@@ -44,6 +45,7 @@ expect_pty_fail() {
        rm -f $OBJ/data
        sed "s/.*/$opts &/" $origkeys >$authkeys
        verbose "key option pty $which"
+       config_defined HAVE_OPENPTY || verbose "skipped for no openpty(3)"
        ${SSH} -ttq -F $OBJ/ssh_proxy somehost "tty > $OBJ/data; exit 0"
        if [ $? -eq 0 ]; then
                r=`cat $OBJ/data`