Age | Commit message (Collapse) | Author | Files |
|
* modules/sed/transform.c (_single_transform_name_to_slist): Avoid
duplicating initial prefix if replace is not needed.
* tests/sed.at: Add new testcases.
|
|
* 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
|
|
|
|
|
|
* 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.
|
|
|
|
* src/query.c (cond_fixup): Traverse entire list of conditions.
(compare): Accept any whitespace (including newline) after OK.
|
|
* 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.
|
|
* lib/stream.c (smap_stream_destroy): Free buffer.
|
|
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.
|
|
* 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.
|
|
* lib/parseopt.c (smap_parseopt): Don't use modname if
SMAP_PARSEOPT_PARSE_ARGV0 is set.
|
|
* 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.
|
|
* 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.
|
|
* .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.
|
|
|
|
|
|
|
|
* 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.
|
|
* doc/smap.texi: Update descriptions.
* tests/smaptest.c: Likewise.
|
|
* 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
|
|
* src/query.c: Allow for both "database" and "transform" after
"dispatch default".
|
|
Reimplement the wordsplit_varnames function using standard wordsplit.
|
|
|
|
* 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.
|
|
|
|
* .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.
|
|
* 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
|
|
* 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.
|
|
|
|
|
|
|
|
|
|
* 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
|
|
* doc/Config: Rewrite.
* doc/Makefile.am: Use Makeinfo 5 instead of texi2htm
* doc/gendocs_template: Ps is not built
* imprimatur: Upgrade.
|
|
* src/close-fds.c (close_fds_except): Use FD_SETSIZE instead
of getmaxfd
|
|
* modules/ldap/ldap.c (getvar): Don't add extra delimiter at the
end of output.
|
|
* 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.
|
|
* 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.
|
|
|
|
|
|
* 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.
|
|
* 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.
|
|
|
|
|
|
* src/close-fds.c (close_fds_above): Fix out-of-range indexing.
|
|
|
|
* 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
|
|
* modules/mailutils/mailutils.c (create_log_stream): Use new
config API.
|
|
* 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.
|