]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Enable password tests on Github ephemeral VMs.
authorDarren Tucker <dtucker@dtucker.net>
Sun, 29 Jun 2025 01:14:18 +0000 (11:14 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Sun, 29 Jun 2025 01:14:18 +0000 (11:14 +1000)
.github/setup_ci.sh
.github/workflows/c-cpp.yml

index 5e778d377136d742c9656d1910c4731fac5f058f..598b0624a6d9749af1a7839c2eb87f84116c6459 100755 (executable)
@@ -299,12 +299,20 @@ if [ ! -z "${INSTALL_PUTTY}" ]; then
     /usr/local/bin/plink -V
 fi
 
-# This is the github "target" as specificed in the yml file.
-case "${target}" in
-ubuntu-latest)
-       echo ubuntu-latest target: setting random password string.
+# If we're running on an ephemeral VM, set a random password and set
+# up to run the password auth test.
+if [ ! -z "${EPHEMERAL_VM}" ]; then
+
+    # This is the github "target" as specified in the yml file.
+    # In particular, ubuntu-latest sets the password field to the locked
+    # value, so unless we reset it here most of the tests will fail.
+    case "${target}" in
+    ubuntu-*)
+       echo ${target} target: setting random password string.
        pw=$(openssl rand -base64 9)
        sudo usermod --password "${pw}" runner
        sudo usermod --unlock runner
+       echo "${pw}" > regress/password
        ;;
-esac
+    esac
+fi
index 7ee1796463f081cf00c011faef8f5108df7a5f38..82087c057aefef8e0f01d3633a742470339fd4a9 100644 (file)
@@ -121,6 +121,8 @@ jobs:
           - { target: macos-15, config: pam }
     runs-on: ${{ matrix.target }}
     steps:
+    - env:
+      EPHEMERAL_VM: yes
     - name: check RUN_ONLY_TARGET_CONFIG
       if: vars.RUN_ONLY_TARGET_CONFIG != ''
       run: sh -c 'if [ "${{ vars.RUN_ONLY_TARGET_CONFIG }}" != "${{ matrix.target }} ${{matrix.config }}" ]; then exit 1; else exit 0; fi'