Package: libmariadb3 Version: 1:10.3.22-0+deb10u1 Severity: wishlist Tags: patch
Dear Maintainer, * What led up to the situation? I want to use libmariadb3 via Perl to connect to a MySQL 8 server with the caching_sha2_password enabled. According to the MariaDB knowledge base this authentication plugin should be available: https://mariadb.com/kb/en/authentication-plugin-sha-256/#client-authentication-plugins Indeed I could verify that the source code of mariadb-10.3 as shipped with Debian Buster contains the necessary code, however the necessary caching_sha2_password.so file is missing from the libmariadb3 binary package. The sha256_password.so was removed with this commit: https://salsa.debian.org/mariadb-team/mariadb-10.3/-/commit/21008f9fdfe0f13a360c61034ead65d3ae144606 Because it does not work when libmariadb3 is not linked against OpenSSL. However this *does not* apply to caching_sha2_password.so which can also link against GnuTLS. * What exactly did you do (or not do) that was effective (or ineffective)? I built a custom libmariadb3 debian package that includes caching_sha2_password.so and installed it on my system. To do so I adjusted the debian/libmariadb3.install file within the source of the package to include usr/lib/*/mariadb19/plugin/caching_sha2_password.so No other changes were required. * What was the outcome of this action? My Perl script worked fine afterwards. See this shell transcript: $ ls -alh /usr/lib/x86_64-linux-gnu/mariadb19/plugin/ total 128K drwxr-xr-x 2 root root 4.0K Jun 10 14:39 . drwxr-xr-x 3 root root 4.0K Jun 10 10:35 .. -rw-r--r-- 1 root root 14K Feb 2 13:33 caching_sha2_password.so.bak -rw-r--r-- 1 root root 69K Feb 2 13:33 client_ed25519.so -rw-r--r-- 1 root root 14K Feb 2 13:33 dialog.so -rw-r--r-- 1 root root 14K Feb 2 13:33 mysql_clear_password.so $ cat test.pl use DBI; my $dbh = DBI->connect("DBI:mysql:information_schema;host=localhost;mysql_read_default_file=/root/default_file", "root", ""); print($dbh->do("SELECT 1")); print("\n") $ cat default_file [client] default-auth=caching_sha2_password [perl] default-auth=caching_sha2_password $ perl test.pl DBI connect('information_schema;host=localhost;mysql_read_default_file=/root/default_file','root',...) failed: Got packets out of order at test.pl line 2. Can't call method "do" on an undefined value at test.pl line 3. $ mv /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so{.bak,} $ perl test.pl 1 After removing the `.bak` suffix from the .so file the script is able to connect to the database and perform a query. Previously it was not. * What outcome did you expect instead? That was the outcome I expected. However I did not expect that it would be necessary to build my own libmariadb3 package. Best regards Tim Düsterhus -- System Information: Debian Release: 10.4 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-debug'), (500, 'stable'), (90, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 4.19.0-8-amd64 (SMP w/2 CPU cores) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8) Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Versions of packages libmariadb3 depends on: ii libc6 2.28-10 ii libgnutls30 3.6.7-4+deb10u4 ii mariadb-common 1:10.3.22-0+deb10u1 ii zlib1g 1:1.2.11.dfsg-1 libmariadb3 recommends no packages. libmariadb3 suggests no packages. -- no debconf information