#680993 libaprutil1-dbd-mysql: AuthDBDUserPWQuery (Module mod_dbd.c) for MySQL doesn't allow SQL statement with a stored procedure #680993
- Package:
- libaprutil1-dbd-mysql
- Source:
- apr-util
- Description:
- Apache Portable Runtime Utility Library - MySQL Driver
- Submitter:
- "pgr.sikkin"
- Date:
- 2025-02-18 02:15:01 UTC
- Severity:
- important
<IfModule mod_gnutls.c>
<VirtualHost 192.168.1.52:xxxx>
ServerAdmin webmaster@cwexample.net
ServerName dav.example.net:xxxx
WSGIDaemonProcess radicale user=calendar group=www-data threads=1
WSGIScriptAlias / /home/www-data/calendar/radicale.wsgi
Alias /favicon.ico /home/www-data/calendar/favicon.ico
<Directory /home/www-data/calendar/>
WSGIProcessGroup radicale
WSGIApplicationGroup %{GLOBAL}
AuthType Basic
AuthName "DAV (CadDAV & CardDav) Authentication"
<IfModule !mod_dbd.c>
# with
AuthBasicProvider file
AuthUserFile /etc/radicale/radicale.passwd
</IfModule>
<IfModule mod_dbd.c>
# with mod_authn_dbd
AuthBasicProvider dbd
AuthDBDUserPWQuery SEE BELOW THE TWO SQL STATEMENT
</IfModule>
Require valid-user
AllowOverride None
</Directory>
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel warn
ErrorLog /home/www-logs/error.log
CustomLog /home/www-logs/access-ssl-dav.log combined
#
# Https config
#
GnuTLSEnable on
# « Normal » permet à GnuTLS d’utiliser les algotithmes standard AES, 3DES, ARCFOUR et CAMELLIA
GnuTLSPriorities Normal
GnuTLSCacheTimeout 500
GnuTLSExportCertificates on
#GnuTLSClientVerify request
GnuTLSClientCAFile /path/to/example.crt
GnuTLSCertificateFile /path/to/dav.crt
GnuTLSKeyFile /path/to/example.pem
</VirtualHos
</IfModule>
with the following directive
AuthDBDUserRealmQuery "SELECT Password From Test Where User = %s"
the MySQL log show
120709 19:23:38 240 Connect mail-usr@localhost on Mail
241 Connect mail-usr@localhost on Mail
242 Connect mail-usr@localhost on Mail
240 Prepare SELECT Password From Test Where User = ?
241 Prepare SELECT Password From Test Where User = ?
242 Prepare SELECT Password From Test Where User = ?
243 Connect mail-usr@localhost on Mail
244 Connect mail-usr@localhost on Mail
243 Prepare SELECT Password From Test Where User = ?
244 Prepare SELECT Password From Test Where User = ?
245 Prepare SELECT Password From Test Where User = ?
120709 19:24:17 242 Execute SELECT Password From Test Where User = 'test.example'
247 Connect mail-usr@localhost on Mail
246 Connect mail-usr@localhost on Mail
246 Prepare SELECT Password From Test Where User = ?
247 Prepare SELECT Password From Test Where User = ?
and we get authorization.
with the following directive
AuthDBDUserPWQuery "call GetApacheAuth( %s )"
the MySQL log are
120709 20:32:56 337 Connect mail-usr@localhost on Mail
338 Connect mail-usr@localhost on Mail
339 Connect mail-usr@localhost on Mail
340 Connect mail-usr@localhost on Mail
337 Prepare call GetApacheAuth( ? )
338 Prepare call GetApacheAuth( ? )
339 Prepare call GetApacheAuth( ? )
340 Prepare call GetApacheAuth( ? )
341 Connect mail-usr@localhost on Mail
341 Prepare call GetApacheAuth( ? )
120709 20:33:04 342 Connect mail-usr@localhost on Mail
342 Prepare call GetApacheAuth( ? )
and we never get any "execute" command
The apache log
[Mon Jul 09 20:22:57 2012] [error] [client 192.168.2.241] Query execution error looking up 'test.example' in database
At the shell prompt
user@machine:/tmp$ mysql --user=mail-usr --password=xxxxxxxx --host=localhost Mail -e "CALL GetApacheAuth('test.example');"
+---------------+
| password |
+---------------+
| yyyyyyyyyyyyy |
+---------------+
Can you try the attached patch and see if it gives you a better error message in the log? Alternatively, I have put the mod_authn_dbd.so compiled for i386 here: http://people.debian.org/~sf/680993/mod_authn_dbd.so $ sha256sum mod_authn_dbd.so 88ee23e8f0cb1b6d775babc86be55300c2517228dab035a60f1a06439c062b61 mod_authn_dbd.so Cheers, Stefan
Hi Stephan,
Thank you for your support and I'm sorry for my delayed answer.
Here are the result I'm getting
MySQL
mysql.log
21029 Connect mail-usr@localhost on Mail
21029 Prepare call GetApacheAuth( ? )
Apache
error.log
[Wed Sep 12 07:16:32 2012] [error] [client 192.168.2.240] Query
execution error looking up 'test.example' in database: PROCEDURE
Mail.GetApacheAuth can't return a result set in the given context
So message error in the log file is more explicit at this time.
Cheers
--
Pierre-Gilles
Laba diena, Noriu Jus informuoti apie šių metų pasikeitimą dėl atnaujintos visos Lietuvos įmonių bazės 2018 metų sausio vidurio. Visi juridiniai asmenys pateikti bazėje yra veikiantys, realiai vykdantys veiklą, turintys įdarbintų darbuotojų. Duomenys pagal Sodrą, Registrų centrą. Bazėje nurodoma ir apyvarta, darbuotojų atlyginimai, darbuotojų skaičius, transporto skaičius ir daug kitų duomenų, kuriuos matysite pavyzdyje. Duomenis galima filtruoti pagal veiklas, miestus ir kitus duomenis. Šią bazę verta turėti visoms įmonėms. Pateiksiu priežastis: 1) Kontaktai pateikti bazėje direktorių ir kitų atsakingų asmenų, didelė tikimybė Jums surasti naujų klientų, partnerių, tiekėjų, kai tiesiogiai bendrausite su direktoriais, komercijos vadovais. 2) Konkurentų analizavimas, tiekėjų atsirinkimas pagal Jums reikalingus kriterijus, galite atsifiltruoti pagal įmonės dydį, bazėje nurodoma kiek įmonės skolingos Sodrai. 3) Lengva, greita ir patogu dirbti su šia baze, elektroninius pašto adresus galite importuoti į elektroninių laiškų siuntimo programas ar sistemas iš kurių siunčiate elektroninius laiškus. Taip pat galite importuoti mobiliųjų telefonų numerius į SMS siuntimo programas. Išsirinkite iš "Veiklų sąrašo" veiklas kurių Jums reikia. ( Sąrašas prisegtas laiške excel faile ) Parašykite, kurias veiklas išsirinkote ir atsiųsime pavyzdį ir pasiūlymą su sąlygomis įmonių bazei įsigyti Pagarbiai, Tadas Giedraitis Tel. nr. +37067881041
Why your applikasi komikku always bug or maintenance -_-