Re: libpreludedb python bindings sql plugin error
Yoann Vandoorselaere <[email protected]> Tue, 11 Aug 2009 17:58:15 +0200
| Newsgroups | gmane.comp.security.ids.prelude.user |
|---|---|
| Message-ID | <1250006295.2866.789.camel@arwen> |
Hi John,
Le jeudi 06 août 2009 à 17:13 -0400, John Askew a écrit :
> I'm trying to access the prelude db via python, using the prewikka code (0.9.14) as a reference. I'm using libprelude 0.9.18 and libpreludedb 0.9.14 (from Ubuntu 9.04 pkgs). I get as far as:
>
>
> >>> from preludedb import *
> >>> settings = preludedb_sql_settings_new()
> >>> preludedb_sql_settings_set(settings, 'host', 'localhost')
> 1
> >>> preludedb_sql_settings_set(settings, 'port', '5432')
> 1
> >>> preludedb_sql_settings_set(settings, 'name', 'prelude')
> 1
> >>> preludedb_sql_settings_set(settings, 'user', 'prelude')
> 1
> >>> preludedb_sql_settings_set(settings, 'pass', '1234')
> 1
> >>> sql = preludedb_sql_new('pgsql', settings)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> preludedb.PreludeDBError: Could not load sql plugin 'pgsql'
>
>
> Prelude and prewikka are running fine on this server, and the plugin
> does exist. Looking through preludedb.c, I think the SQL_PLUGIN_DIR
> may not be set somewhere (should be
> '/usr/lib/libpreludedb/plugins/sql/'), but I'm not certain.
>
> Any help would be appreciated. I've done quite a bit of searching and
> haven't found much documentation other than the prewikka and c code
> itself, so any pointers to better docs/resources would be great too.
You need to call preludedb.preludedb_init() so that libpreludedb
register the installed plugins.
Regards,
--
Yoann Vandoorselaere | Directeur Technique/CTO | PreludeIDS Technologies
Tel: +33 (0)8 70 70 21 58 Fax: +33(0)4 78 42 21 58
http://www.prelude-ids.com
_______________________________________________
Prelude-user site list
[email protected]
http://lists.prelude-ids.org/mailman/listinfo/prelude-user