castaglia / proftpd-mod_conf_sql Goto Github PK
View Code? Open in Web Editor NEWProFTPD module that reads proftpd.conf data from SQL tables
ProFTPD module that reads proftpd.conf data from SQL tables
when read the configuration in sqlconf_conf they not reinitialise sqlconf_confi read counter at the end of the configuration read.
then when proftpd restart, sqlconf_confi are at the last position and canot send the readed sql configuration (they are readed in new array, the old are not destroy!).
i've modifyed the source to reinitialise sqlconf_confi at array creation (after make_array call)
and use file_handle pool in place of sql_conf pool.
and set to NULL sqlconf_conf at the end of configuration.
this modification ar in my pull request #4
Currently the conf2sql.pl
and sql2conf.pl
scripts build up the SQL statements to execute, but are not really using prepared statements (especially with placeholders). This means that space-bearing values could very well cause problems.
in documentation at https://htmlpreview.github.io/?https://github.com/Castaglia/proftpd-mod_conf_sql/blob/master/mod_conf_sql.html you don't have sqlite schema example, but seem to exist her: https://github.com/Castaglia/proftpd-mod_conf_sql/blob/master/sqlite-conf.sql
CREATE TABLE IF NOT EXISTS ftpctx (
id INTEGER PRIMARY KEY AUTOINCREMENT,
parent_id INTEGER UNSIGNED,
name TEXT,
type TEXT,
value TEXT
);
CREATE TABLE IF NOT EXISTS ftpconf (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
value BLOB
);
CREATE TABLE IF NOT EXISTS ftpmap (
conf_id INTEGER UNSIGNED NOT NULL,
ctx_id INTEGER UNSIGNED NOT NULL
);
Add the necessary support for configuring and using SSL/TLS when connecting to the configuration databases.
Update the mod_conf_sql
module to use trace logging, where appropriate.
Update the sql2conf.pl
script to support SQLite3 databases, which don't have host/server/db names, and provide the relevant SQLite3 schema.
Per @mcarbonneaux , it would be great if mod_conf_sql
supported SQLite databases, both in its provided schema examples and the conf2sql.pl
Perl script.
As part of the travis-ci builds, this project should include some integration tests, where we make use of the provided Postgres, MySQL, and SQLite database. The test would be something like:
$ ./proftpd -td10 -c sql://...
So that the locally built proftpd
is directed to test the configuration the specified databases.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.