From: Nick Porter Date: Tue, 28 May 2024 11:15:06 +0000 (+0100) Subject: Force use of mysql_native_password for test account X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43c6fac2a69ee1e31ea6fab3bca89dc6cd080a80;p=thirdparty%2Ffreeradius-server.git Force use of mysql_native_password for test account To allow older client library to authenticate against newer server. MySQL and MariaDB have different one line syntaxes for this - the version implemented here works with both. --- diff --git a/.github/actions/ci-tests/action.yml b/.github/actions/ci-tests/action.yml index 57d13502117..6c94a4bf448 100644 --- a/.github/actions/ci-tests/action.yml +++ b/.github/actions/ci-tests/action.yml @@ -155,7 +155,7 @@ runs: if: ${{ inputs.use_docker == 'true' }} shell: bash run: | - mysql -h ${{ inputs.sql_mysql_test_server }} -u root -e "CREATE USER 'radius'@'%' IDENTIFIED BY 'radpass';" + mysql -h ${{ inputs.sql_mysql_test_server }} -u root -e "CREATE USER 'radius'@'%' IDENTIFIED WITH mysql_native_password; ALTER USER 'radius'@'%' IDENTIFIED BY 'radpass';" mysql -h ${{ inputs.sql_mysql_test_server }} -u root -e "GRANT ALL ON radius.* TO 'radius'; FLUSH PRIVILEGES;" - name: Setup databases diff --git a/raddb/mods-config/sql/main/mysql/setup.sql b/raddb/mods-config/sql/main/mysql/setup.sql index a4a142f4fef..f77dc563255 100755 --- a/raddb/mods-config/sql/main/mysql/setup.sql +++ b/raddb/mods-config/sql/main/mysql/setup.sql @@ -12,7 +12,8 @@ -- -- Create default administrator for RADIUS -- -CREATE USER 'radius'@'localhost' IDENTIFIED BY 'radpass'; +CREATE USER 'radius'@'localhost' IDENTIFIED WITH mysql_native_password; +ALTER USER 'radius'@'localhost' IDENTIFIED BY 'radpass'; -- -- The server can read the authorisation data