]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Set runner pasword to random string.
authorDarren Tucker <dtucker@dtucker.net>
Tue, 20 May 2025 05:01:29 +0000 (15:01 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Wed, 21 May 2025 06:07:00 +0000 (16:07 +1000)
The most recent version of the Github ubuntu-latest image sets the
password field to "!" which sshd considers to be a locked account,
breaking most of the tests.

.github/setup_ci.sh
.github/workflows/c-cpp.yml

index b381adebeaceddf6846539d97c2b61397716d077..711a469522bfdb0f11a312e0ee8f8caf333727cb 100755 (executable)
@@ -1,8 +1,11 @@
 #!/bin/sh
 
+config="$1"
+target="$2"
+
 PACKAGES=""
 
- . .github/configs $@
+ . .github/configs ${config}
 
 host=`./config.guess`
 echo "config.guess: $host"
@@ -32,7 +35,7 @@ case "$host" in
        PACKAGER=apt
 esac
 
-TARGETS=$@
+TARGETS=${config}
 
 INSTALL_FIDO_PPA="no"
 export DEBIAN_FRONTEND=noninteractive
@@ -289,3 +292,13 @@ 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.
+       pw=$(openssl rand -base64 9)
+       sudo usermod --password "${pw}" runner
+       sudo usermod --unlock runner
+       ;;
+esac
index 91b07ed976141d55a0140cdb37263b8c03b962fa..7c37c9ce2cb12dc630a76f91061c389c82948b3c 100644 (file)
@@ -128,7 +128,7 @@ jobs:
         CYGWIN: "winsymlinks:native"
     - uses: actions/checkout@main
     - name: setup CI system
-      run: sh ./.github/setup_ci.sh ${{ matrix.config }}
+      run: sh ./.github/setup_ci.sh ${{ matrix.config }} ${{ matrix.target }}
       env:
         CYGWIN_SETUP: ${{ steps.cygwin_install.outputs.setup }}
     - name: autoreconf