[MDEV-20569] Plugin dialog could not be loaded (wrong path) Created: 2019-09-12  Updated: 2020-08-25  Resolved: 2019-10-31

Status: Closed
Project: MariaDB Server
Component/s: Authentication and Privilege System
Affects Version/s: 10.2.27, 10.3.18, 10.4.8
Fix Version/s: 10.2.28, 10.3.19, 10.4.9

Type: Bug Priority: Blocker
Reporter: Nicolas Payart Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 6
Labels: authentication, client, pam, plugins
Environment:

Linux Debian 9.11 (Stretch), mariadb-server installed using APT repository from downloads.mariadb.org


Issue Links:
Relates
relates to CONC-376 missing prefix for searching mysql_cl... Open
relates to CONC-383 Plugin auth_gssapi_client could not ... Closed
relates to CONC-431 Use bcrypt on Windows for authenticat... Closed
relates to MDEV-19807 MariaDB client plugin path is wrong Closed
relates to MDEV-19942 Default installation of mariadb-serve... Closed

 Description   

Since I upgraded from MariaDB 10.3.17 to 10.3.18, using apt upgrade (Debian Stretch) followed by a mysql_upgrade, I can't authenticate anymore using PAM:

myuser:~# mysql
ERROR 1045 (28000): Plugin dialog could not be loaded: /usr//usr/lib/mysql/plugin/dialog.so: cannot open shared object file: No such file or directory

=> As you can see, Plugin Path /usr//usr/lib/mysql/plugin/dialog.so is wrong (duplicate prefix /usr/)

Here are my current settings:

+---------------+------------------------+
| Variable_name | Value                  |
+---------------+------------------------+
| basedir       | /usr                   |
| plugin_dir    | /usr/lib/mysql/plugin/ |
+---------------+------------------------+

Specifying the right path for plugin-dir on the command line fixes the problem:

myuser:~# mysql -e "exit" && echo "OK"
ERROR 1045 (28000): Plugin dialog could not be loaded: /usr//usr/lib/mysql/plugin/dialog.so: cannot open shared object file: No such file or directory
 
myuser:~# mysql --plugin-dir=/usr/lib/mysql/plugin -e "exit" && echo "OK"
OK



 Comments   
Comment by Laszlo Soos [ 2019-09-12 ]

Same on 10.4.8 with clear_password.

bcf17c125bf3:~# mysql -u asd -p
Enter password:
ERROR 1045 (28000): Plugin mysql_clear_password could not be loaded: Error loading shared library /usr//usr/lib/mysql/plugin/mysql_clear_password.so: No such file or directory
bcf17c125bf3:~# mysqld -V
mysqld  Ver 10.4.8-MariaDB for Linux on x86_64 (MariaDB Server)

Comment by Geoff Montee (Inactive) [ 2019-09-17 ]

An almost identical bug was just fixed in the previous round of releases. See MDEV-19807.

Comment by Geoff Montee (Inactive) [ 2019-09-18 ]

Maybe this was broken by this change that was part of the fix for CONC-431?:

https://github.com/MariaDB/mariadb-connector-c/commit/11a2d035dde02b2a4379d5c5b978ada7447e9bfd#diff-6005b12e9a4ecd5532b0a3f629c5a4e6

Comment by Timofey Turenko [ 2019-09-26 ]

run into the same problem with Maxscale kerberos tests:

(test does "echo select User,Host from mysql.user | mysql --ssl -uusr1 -h maxscale.maxscale.test -P 4006"):

244: 09:39:57.930 94.943335: Installing gssapi plugin to all nodes
244: 09:39:58.297 95.309789: Creating usr1 user
244: 09:39:58.302 95.315556: Trying use usr1 to execute query: RW Split
244: ERROR 1045 (28000): Plugin auth_gssapi_client could not be loaded: /usr//usr/lib64/mysql/plugin/auth_gssapi_client.so: cannot open shared object file: No such file or directory
244: 96.446531: TEST_FAILED! Error executing query against RW Split
244: 09:39:59.433 96.446551: Trying use usr1 to execute query: Read Connection Master
244: ERROR 1045 (28000): Plugin auth_gssapi_client could not be loaded: /usr//usr/lib64/mysql/plugin/auth_gssapi_client.so: cannot open shared object file: No such file or directory
244: 96.758715: TEST_FAILED! Error executing query against Read Connection Master
244: 09:39:59.746 96.758735: Trying use usr1 to execute query: Read Connection Slave
244: ERROR 1045 (28000): Plugin auth_gssapi_client could not be loaded: /usr//usr/lib64/mysql/plugin/auth_gssapi_client.so: cannot open shared object file: No such file or directory

Comment by John Howe [ 2019-10-03 ]

I am seeing the same issue with Debian 8.11, mariadb 10.2.27+maria~jessie

Since I can't downgrade the packages, I have a temporary work-around by adding the following under /etc/mysql/mariadb.conf.d/99-20569-hotfix.cnf

Fix for https://jira.mariadb.org/browse/MDEV-20569
[client]
plugin-dir=/usr/lib/mysql/plugin

Comment by Hartmut Holzgraefe [ 2019-10-07 ]

On 10.2.27 the compiled in default plugin dir path is clearly wrong:

$ strings /usr/bin/mysql | grep /plugin
/usr//usr/lib64/mysql/plugin

Same on 10.2.26 returns expected result:

$ strings /usr/bin/mysql | grep /plugin
/usr/lib64/mysql/plugin

Comment by Georg Richter [ 2019-10-11 ]

Sanja, could you please check if changeset 8e6812be71d0b44d302fda84d53a6ec106b48296 will fix the problem?

Comment by Stefan Scherfke [ 2019-10-15 ]

I have a similar problem with the python-mariadbclient: When I try to perform gssapi-auth with it, I get `/home/...env//hom/...env/lib/plugin/auth_gssapi_client.so: cannot open shared object file: No such file or directory')`.

The changes 8e6812be71d0b44d302fda84d53a6ec106b48296 fixes the problem for me.

Generated at Thu Feb 08 09:00:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.