Bug 1061408 - rlm_sql_sqlite module uses function calls newer than available in sqlite-3.6.20
Summary: rlm_sql_sqlite module uses function calls newer than available in sqlite-3.6.20
Alias: None
Product: Fedora
Classification: Fedora
Component: freeradius
Version: 20
Hardware: All
OS: All
Target Milestone: ---
Assignee: John Dennis
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-02-04 19:17 UTC by Stefan Paetow
Modified: 2014-06-16 23:27 UTC (History)
4 users (show)

Fixed In Version: freeradius-3.0.3-2.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-06-16 23:27:56 UTC

Attachments (Terms of Use)
freeradius-rlm_sql_sqlite-v2api.patch (13.81 KB, patch)
2014-02-05 15:07 UTC, Stefan Paetow
no flags Details | Diff

Description Stefan Paetow 2014-02-04 19:17:26 UTC
Description of problem:

The FreeRADIUS 3.0 rlm_sql_sqlite module uses a function call that is not available in the sqlite 3.6.20 module (which is current in CentOS 6.5 and by extension its RHEL equivalent).

When attempting to use SQLite, FreeRADIUS will throw an error related to sqlite3_create_function_v2() not being available.

Version-Release number of selected component (if applicable):


How reproducible:

Try to use the freeradius-sqlite package (which includes SQLite support for FreeRADIUS).

Steps to Reproduce:
1. yum install sqlite freeradius-sqlite freeradius (should install sqlite 3.6.20, freeradius 3.0.1 and freeradius-sqlite 3.0.1).
2. Configure a SQLite database
2.1 sqlite3 /var/tmp_sql_database
2.2 At sqlite prompt: create table psk_keys (keyid text primary key, key blob);
2.3 At sqlite prompt: .exit
2.4 chmod 777 /var/tmp_sql_database
3. Configure FreeRADIUS SQLite support
3.1 Create file /etc/raddb/mods-available/psksql.
3.2 Paste the below text into said file:

sql psksql {
  driver = "rlm_sql_sqlite"
  sqlite {
    filename = "/var/tmp_sql_database"

3.3. ln -s /etc/raddb/mods-available/psksql /etc/raddb/mods-enabled/psksql
4. Start FreeRADIUS 3 in debug mode: radius -fxx -l stdout

Actual results:

FreeRADIUS refuses to load with error:

Could not link driver rlm_sql_sqlite: /usr/lib64/freeradius/rlm_sql_sqlite.so: undefined symbol: sqlite3_create_function_v2 Make sure it (and all its dependent libraries!)are in the search path of your system's ld.

Expected results:

FreeRADIUS should be able to load ok.

Additional info:

Doing a positive test by building SQLite 3.8.1 from source and ensuring the public version of SQLite is 3.8.1 (check with "sqlite3 -version"), FreeRADIUS then loads ok.

There is a github commit for this fix:


The SQLite release that shipped with the function is 3.7.3 as per http://freecode.com/projects/sqlite/releases/323290

Comment 1 Stefan Paetow 2014-02-05 15:07:49 UTC
Created attachment 859688 [details]

This patch combines Github commits b1b895b2cdc9563398d873023c535763540722ee and 32d407e8ad473670ffbf4c3090875e7730bc764c in https://github.com/FreeRADIUS/freeradius-server/commits/v3.0.x/src/modules/rlm_sql/drivers/rlm_sql_sqlite

This patch improves the checks for the various V2 API functions used in rlm_sql_sqlite to be backward-compatible with the current version of SQLite on CentOS 6.4/6.5 (and by default RHEL 6.4) and earlier (v 3.6.20).

Comment 2 Fedora Update System 2014-05-07 18:32:53 UTC
freeradius-3.0.2-1.fc20 has been submitted as an update for Fedora 20.

Comment 3 Fedora Update System 2014-05-08 10:05:05 UTC
Package freeradius-3.0.2-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing freeradius-3.0.2-1.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-05-24 17:18:33 UTC
freeradius-3.0.3-1.fc20 has been submitted as an update for Fedora 20.

Comment 5 Fedora Update System 2014-06-16 23:27:56 UTC
freeradius-3.0.3-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.