[Bug 1859773] Re: Apache DBD Auth not working with mysql
Brian Murray
brian at ubuntu.com
Fri Mar 20 20:23:44 UTC 2020
Hello Andreas, or anyone else affected,
Accepted apr-util into eoan-proposed. The package will build now and be
available at https://launchpad.net/ubuntu/+source/apr-
util/1.6.1-4ubuntu0.1 in a few hours, and then in the -proposed
repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed. Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested and change the tag from
verification-needed-eoan to verification-done-eoan. If it does not fix
the bug for you, please add a comment stating that, and change the tag
to verification-failed-eoan. In either case, without details of your
testing we will not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance for helping!
N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.
** Changed in: apr-util (Ubuntu Eoan)
Status: In Progress => Fix Committed
** Tags added: verification-needed verification-needed-eoan
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apr-util in Ubuntu.
https://bugs.launchpad.net/bugs/1859773
Title:
Apache DBD Auth not working with mysql
Status in apr-util package in Ubuntu:
Fix Released
Status in apr-util source package in Eoan:
Fix Committed
Status in apr-util source package in Focal:
Fix Released
Bug description:
[Impact]
The MySQL dbd driver fails to load into apache. This causes apache2 to fail to start if it's configured in this way.
Since MySQL 8.0.2[1], the my_init() function is no longer exported,
and it's not expected that clients will call it.
Confirming that, the current build logs for apr-util show:
/home/ubuntu/deb/apr-util/apr-util-1.6.1/dbd/apr_dbd_mysql.c:1267:5: warning: implicit declaration of function ‘my_init’; did you mean ‘mysql_init’? [-Wimplicit-function-declaration]
1267 | my_init();
| ^~~~~~~
| mysql_init
Furthermore, they also show[2] that loading the mysql driver failed,
but that doesn't cause the build to fail (unknown reason: not
addressed in this update):
(...)
Loaded pgsql driver OK.
Failed to open pgsql[]
Failed to load driver file apr_dbd_mysql.so <<<<<<<
Loaded sqlite3 driver OK.
(...)
The fix is to not call my_init(). This was confirmed with MySQL
upstream.
[Test Case]
* install and enable the dbd authentication module
sudo apt update
sudo apt install apache2 libaprutil1-dbd-mysql -y
sudo a2enmod authn_dbd
sudo systemctl restart apache2
* confirm apache is still working:
curl localhost
* now enable the mysql driver
echo DBDriver mysql | sudo tee /etc/apache2/conf-available/dbd_mysql.conf
sudo a2enconf dbd_mysql
* confirm error when restarting apache
sudo systemctl restart apache2
With the fixed packages, the restart above works just fine.
[Regression Potential]
A deprecated initialization function isn't being called anymore. This SRU isn't testing actual authentication using MySQL, just that the module now loads. There could be specific details in apr-utils that were being handled by my_init() before, and now aren't.
[Other Info]
Patch wasn't upstreamed because it should better check when to call my_init() and when not, i.e., check the mysql version properly and decide.
[Original Description]
Using Apache DBD auth for MySQL server 8 causes an error in Focal 20.04
Same setup is working fine in 16.04 and 18.04
The following line in Apache2/conf-enabled/ causes the error:
DBDriver mysql
apache start failed:
apachectl[1188]: Can't load driver file apr_dbd_mysql.so
The file exists in
/usr/lib/x86_64-linux-gnu/apr-util-1/apr_dbd_mysql.so
linking the file to
/lib/apache2/modules/
doesn't change the error message
1. https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-2.html
2. https://launchpadlibrarian.net/436958095/buildlog_ubuntu-eoan-amd64.apr-util_1.6.1-4build1_BUILDING.txt.gz
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apr-util/+bug/1859773/+subscriptions
More information about the foundations-bugs
mailing list