]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Force use of mysql_native_password for test account
authorNick Porter <nick@portercomputing.co.uk>
Tue, 28 May 2024 11:15:06 +0000 (12:15 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 7 Jun 2024 02:26:58 +0000 (22:26 -0400)
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.

.github/actions/ci-tests/action.yml
raddb/mods-config/sql/main/mysql/setup.sql

index 57d13502117de07dc139f8e460642da76c601653..6c94a4bf448a6333b9ca6dfb7ebeb45c942a4d4d 100644 (file)
@@ -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
index a4a142f4fefe31655dc5887f1ad353e6b7dc119d..f77dc56325585999e0ccb0b447da394781409ba0 100755 (executable)
@@ -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