aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2021-08-28transform: fix replacement of numbered pattern instancesHEADmasterSergey Poznyakoff2
* modules/sed/transform.c (_single_transform_name_to_slist): Avoid duplicating initial prefix if replace is not needed. * tests/sed.at: Add new testcases.
2021-07-09Introduce per-database capabilitiesSergey Poznyakoff6
* include/smap/module.h (SMAP_CAPA_DBCAP): New capability. (smap_module) <smap_dbcap>: New member. * modules/guile/guile.c (guile_dbcap): New function. Raise the SMAP_CAPA_DBCAP capability. * modules/lua/lua.c (mod_dbcap): New function. Raise the SMAP_CAPA_DBCAP capability. * src/module.c (_load_module): Check for pmod->smap_dbcap if SMAP_CAPA_DBCAP is set. * src/query.c (dbi_capa): New function. (rule_fixup): Use dbi_capa to check the actual database capabilities. * NEWS: Document SMAP_CAPA_DBCAP
2021-07-09Accept colon-delimited lists as arguments for all *load-path statementsSergey Poznyakoff1
2021-07-09Initial documentation for the Lua moduleSergey Poznyakoff1
2021-07-08New module: luaSergey Poznyakoff9
* configure.ac: Check for lua * modules/Makefile.am (SUBDIRS): Add lua (conditionally). * modules/lua/Makefile.am: New file. * modules/lua/lua.c: New file. * tests/Makefile.am: Add new test. * tests/testsuite.at: Likewise. * tests/atlocal.in (LUA_COND): New variable * tests/lua.at: New test. * NEWS: Update.
2021-07-06Fix the description of module lookup processSergey Poznyakoff1
2021-07-06BugfixesdlopenSergey Poznyakoff1
* src/query.c (cond_fixup): Traverse entire list of conditions. (compare): Accept any whitespace (including newline) after OK.
2021-07-06New dispatch condition: ARG in DBSergey Poznyakoff7
* NEWS: Document new condition. * doc/smap.texi: Likewise. * include/smap/stream.h (smap_null_stream_create) (smap_memory_stream_create): New protos. * lib/memstr.c: New file. * lib/nullstr.c: New file. * lib/Makefile.am: Add new sources. * src/query.c (comp_in): New comparison type. (comp_cond): New (union) member: dbi (T_IN): New token. (parse_dispatch_comp): Parse the construct "ARG in DB". (rule_fixup): Traverse also the conditions resolving the DB part to the actual database. (compare): Take smap_conninfo as the third argument. Handle comp_in. (dispatch_query_pack): Remove superfluous parameter (conninfo). It is already carried in struct query_pack.
2021-07-05Fix memory leakSergey Poznyakoff1
* lib/stream.c (smap_stream_destroy): Free buffer.
2021-07-05New database: getentSergey Poznyakoff6
Performs look ups in various system databases. * NEWS: Update. * configure.ac: Build modules/getent. * modules/Makefile.am: Likewise. * doc/smap.texi: Document the getent database. * modules/getent/Makefile.am: New file. * modules/getent/getent.c: New file.
2021-07-05Yet another bugfixSergey Poznyakoff2
* src/smapd.c (optcache_new): Initialize ->next. (smap_session_server,smap_inet_server): Create sockmap without SMAP_STREAM_NO_CLOSE flag. * src/query.c (find_dispatch_rule): Don't assume loop variable is meaningful outside of LIST_FOREACH_FROM.
2021-07-05Minor fix in parseoptSergey Poznyakoff1
* lib/parseopt.c (smap_parseopt): Don't use modname if SMAP_PARSEOPT_PARSE_ARGV0 is set.
2021-07-05BugfixesSergey Poznyakoff3
* modules/ldap/ldap.c (make_options): Remove duplicate option definition. * src/module.c (init_databases): Don't reference object that has been freed. * src/query.c (dispatch_query_pack): Check if the list is empty prior to referencing it.
2021-07-04Fix option parserSergey Poznyakoff6
* lib/parseopt.c (find_opt): Fix various corner cases. (smap_parseopt): Fix option/non-option permutation. * tests/Makefile.am: Add new test. * tests/testsuite.at: Add new test. * tests/testopt.c: New test helper. * tests/parseopt.at: New test.
2021-07-02Use POSIX dlopent, dlsumr, dlclose.Sergey Poznyakoff19
* .gitignore: Update. * Makefile.am (SUBDIRS): Remove libltdl * configure.ac (LT_WITH_LTDL et al): Removed. Check for libtool and dlopen explicitly. * include/smap/module.h (SMAP_EXPORT): Remove. (SMAP_MODULE_VERSION): Raise version number. * modules/echo/echo.c: Change declaration of smap_module. * modules/guile/guile.c: Likewise. * modules/ldap/ldap.c: Likewise. * modules/mailutils/mailutils.c: Likewise. * modules/mysql/mysql.c: Likewise. * modules/postgres/postgres.c: Likewise. * modules/sed/sed.c: Likewise. * src/Makefile.am (smapd_LDADD): Remove @LIBLTDL@ (noinst_HEADERS): Add list.h * src/list.h: New file (from https://git.gnu.org.ua/micron.git) * src/common.h (e2nrealloc): New proto. * src/mem.c (e2nrealloc): New function. * src/module.c (mod_load_path): Change data type. (try_load_in_path): New function. (_load_module): Try prepend path, LD_LIBRARY_PATH, SMAP_MODDIR, and append path, in that order. * src/query.c (dispatch_rule): Remove prev,next, add link instead. All uses changed * src/smapd.h: Don't include ltdl.h. Include list.h (DCLATT,DCLDET,DCLLOC,DCLLIST,DCLIDLIST): Remove. (struct smap_module_instance: Change type of handle to void* Remove prev,next, add link instead. (struct smap_database_instance): Remove prev,next, add link instead.
2021-07-01Update doc/Makefile.amSergey Poznyakoff4
2021-07-01Revamp generation of the webdocsSergey Poznyakoff8
2021-07-01Version 2.1v2.1Sergey Poznyakoff2
2021-06-30Add ldap test. Minor fixes in smapd.Sergey Poznyakoff8
* configure.ac: New configuration variables: SLAPD and SLAPADD, * src/cmdline.opt: The --stderr and --syslog options take effect immediately, and cache their result. * src/smapd.c (main): Make sure --stderr takes effect before initializing the logging subsystem. * tests/atlocal.in: Define LDAP_COND. * tests/ldap.at: New file. * tests/Makefile.am: Add ldap.at * tests/testsuite.at: Add ldap.at * tests/smaptest.c: Rewrite. New command line options: -t, -x, -v.
2021-06-29Minor changesSergey Poznyakoff2
* doc/smap.texi: Update descriptions. * tests/smaptest.c: Likewise.
2021-05-27Test guile modulesSergey Poznyakoff5
* tests/Makefile.am: Add new file. * tests/testsuite.at (AT_SKIP_TEST, SMAP_PREREQ): New macros. Include guile.at * tests/atlocal.in: Conditionally define GUILE_COND * tests/guile.at: New file
2021-05-27Improve configuration parser.Sergey Poznyakoff1
* src/query.c: Allow for both "database" and "transform" after "dispatch default".
2021-05-26Fix ldap moduleSergey Poznyakoff1
Reimplement the wordsplit_varnames function using standard wordsplit.
2021-05-26Update copyright yearsSergey Poznyakoff77
2021-05-26Bugfixes. Include the testsuite.Sergey Poznyakoff17
* Makefile.am (SUBDIRS): Add tests. * configure.ac: Enable testsuite. * doc/smap.texi: Document changes to the smapc tool. * modules/mailutils/mailutils.c: Rewrite for mailutils 3.x * src/cfg.c (read_line): Avoid integer overflow. Increment cfg_line after empty lines. * src/getopt.m4 (print_option_descr): Fix variable type. * src/query.c (match_cond): Fix evaluation of boolean "not". * src/smapc.c: Change command line syntax. The URL is always given with the -S option. Any number of map/key pairs can be given in the command line. New option -a (--annotate) instructs the tool to annotate each response with the corresponding query (map/key pair). * src/smapccmd.opt: New option: -a, --annotate. The testsuite * tests/.gitignore: New file. * tests/Makefile.am: New file. * tests/atlocal.in: New file. * tests/dispatch.at: New file. * tests/echo.at: New file. * tests/sed.at: New file. * tests/smaptest.c: New file. * tests/testsuite.at: New file.
2021-05-26Use plain git to generate the ChangeLog fileSergey Poznyakoff2
2019-07-10Use wordsplit from a submoduleSergey Poznyakoff16
* .gitmodules (wordsplit): New module. * configure.ac: Link lib/wordsplit/wordsplit.h to include/smap/wordsplit.h * include/smap/Makefile.am (pkginclude_HEADERS): Install wordsplit.h from submodule. * include/smap/wordsplit.h: Remove. * lib/wordsplit.c: Remove. * lib/Makefile.am: Access wordsplit sources from the submodule. * modules/echo/Makefile.am (AM_CPPFLAGS): Add -I$(top_builddir)/include * modules/guile/Makefile.am: Likewise. * modules/ldap/Makefile.am: Likewise. * modules/mailutils/Makefile.am: Likewise. * modules/mysql/Makefile.am: Likewise. * modules/postgres/Makefile.am: Likewise. * modules/sed/Makefile.am: Likewise. * src/Makefile.am: Likewise.
2019-05-10Support for Guile 2.2Sergey Poznyakoff5
* NEWS: Update. * README: Update. * configure.ac: Drop support for Guile versions prior to 2.2 and Mailutils prior to 3.0 * modules/guile/getpw.scm: Use inet-ntop instead of the withdrawn inet-ntoa. * modules/guile/guile.c: Rewrite for Guile 2.2
2017-11-10Pull wordsplit from grecs 3299cf1c.Sergey Poznyakoff4
* include/smap/wordsplit.h: New version. * lib/wordsplit.c: New version. * modules/ldap/ldap.c (getvar): Rewrite to match new prototype. * src/cfg.c (wrdse_to_ex): Remove WRDSE_NOSUPP.
2017-11-10Placate cc warningsSergey Poznyakoff6
2016-11-02Follow Mailutils commit dc62b399Sergey Poznyakoff1
2016-10-29Convert to mailutils 2.99.992Sergey Poznyakoff2
2015-06-20Version 2.0Sergey Poznyakoff3
2015-06-20Minor changesSergey Poznyakoff4
* src/smapc.c (prompt): Don't use static string. Fixes coredump on using "prompt" command. (get_input_line) [!WITH_READLINE]: Print prompt. (main): Initialize prompt. * doc/Makefile.am (GENDOCS): Add html-specific configuration file. * doc/Config: Renamed to doc/html.init * modules/guile/guile.c (guile_call_proc): Use scm_c_catch
2015-03-01Switch to Texinfo 5.0Sergey Poznyakoff5
* doc/Config: Rewrite. * doc/Makefile.am: Use Makeinfo 5 instead of texi2htm * doc/gendocs_template: Ps is not built * imprimatur: Upgrade.
2014-10-15Bugfix.Sergey Poznyakoff1
* src/close-fds.c (close_fds_except): Use FD_SETSIZE instead of getmaxfd
2014-09-08ldap: bugfixSergey Poznyakoff1
* modules/ldap/ldap.c (getvar): Don't add extra delimiter at the end of output.
2014-09-05ldap: support for multiple attributesSergey Poznyakoff2
* modules/ldap/ldap.c (ldap_conf)<joinstr>: New member. (ldap_conf_free): Free joinstr. (ldap_conf_cpy): Copy joinstr. (make_options): New option join-delim (getvar_data)<joinstr>: New member. (getvar): Concatenate multiple values using joinstr as delimiter. (send_reply): Last argument is struct ldap_db*. All uses changed. * doc/smap.texi: Document join-delim.
2014-09-01Bugfixes.Sergey Poznyakoff5
* configure.ac: Fix copy-paste error * lib/wordsplit.c (wordsplit_varnames): Initialize count * modules/ldap/ldap.c (ldap_conf)<protocol>: Change type to long (parse_ldap_conf,mod_ldap_init_db): Fix arguments to smap_error (make_options): Handle ldap_version (parse_ldap_uri): Use wordsplit_ instead of mu_wordsplit_ (ldap_connect): Handle ldap_version setting. Use ldap_unbind_ext instead of the deprecated ldap_unbind. (mod_ldap_free_db,mod_ldap_close): Add missing return statements. (mod_ldap_query): Additional debug output. * src/cmdline.opt: Update copyright years. * src/smapccmd.opt: Likewise.
2014-08-28Fix typoSergey Poznyakoff1
2014-08-28Update docsSergey Poznyakoff1
2014-08-26ldap: use /etc/ldap.conf by defaultSergey Poznyakoff3
* NEWS: Update. * doc/smap.texi: Document the LDAP module. * modules/ldap/ldap.c (dfl_config_file): New static. (make_options): New function. (mod_ldap_init_db): Read settings from /etc/ldap.conf (or a file specified with config-file option) first. Then override them with the settings from the command line.
2014-08-24New module: ldapSergey Poznyakoff11
* configure.ac: Detect LDAP. New option --with-ldap * include/smap/parseopt.h (smap_option)<func>: Change signature. (SMAP_DELIM_EQ,SMAP_DELIM_WS,SMAP_DELIM_MASK) (SMAP_PARSE_SUCCESS,SMAP_PARSE_NOENT) (SMAP_PARSE_INVAL): New defines. (smap_parseline): New proto. * include/smap/wordsplit.h (wordsplit)<ws_getvar>: Remove const from the return value: the function should allocate memory. (wordsplit_varnames): New proto. * lib/wordsplit.c (ISVARBEG,ISVARCHR): New macros. (wordsplit_varnames): New function (expvar): ws_getvar allocates memory. * lib/parseopt.c (find_opt): Take flags as additional argument. Support case-insensitive comparison and whitespace delimiters. (smap_parseline): New function. (smap_parseopt): Rewrite using smap_parseline. * modules/Makefile.am: Add ldap module. * modules/ldap/Makefile.am: New file. * modules/ldap/ldap.c: New file. * modules/mysql/Makefile.am: Minor change. * modules/mysql/mysql.c: Minor change. * src/srvman.c (smap_server_new): Save url.
2014-08-23Update build system: use AP_CPPFLAGS instead of INCLUDES and upgrade grecsSergey Poznyakoff10
2014-08-23Update copyright yearsSergey Poznyakoff81
2013-01-17BugfixSergey Poznyakoff1
* src/close-fds.c (close_fds_above): Fix out-of-range indexing.
2012-07-03Minor fix.Sergey Poznyakoff1
2011-03-09Bugfixes.Sergey Poznyakoff4
* modules/guile/Makefile.am (BUILT_SOURCES): Don't list guile.c * modules/mailutils/mailutils.c (checksize): Rewrite as a wrapper over an auxiliary function, to avoid memory leaks on errors. Make sure res->auth always has a meaningful value. * NEWS, configure.ac: version 1.1.90
2011-03-07Sync with MU commit 4bcd5c9de0cb6ca85bcc3a35b1518739b939b009.Sergey Poznyakoff1
* modules/mailutils/mailutils.c (create_log_stream): Use new config API.
2010-12-29Switch to Mailutils-3.Sergey Poznyakoff1
* modules/mailutils/mailutils.c (expand_reply_text): Fix memory management error. (smap_diag_printer,_smap_debug_printer): Remove. (_smap_log_stream_create, create_log_stream): New functions. (mod_mailutils_init): Create MU3 log stream.

Return to:

Send suggestions and report system problems to the System administrator.