aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2009-11-24Implement inetd builtin services.Sergey Poznyakoff6
* src/inetd-bi.c: New file. * src/Makefile.am (pies_SOURCES): Add inetd-bi.c. * src/pies.h (struct component): New member `builtin'. (qotdfile): New extern. (inetd_builtin): New struct. (inetd_builtin_lookup): New proto. * src/progman.c (prog_start): Handle internal services. * src/inetd.c (inetd_conf_file): Handle internal services. * src/pies.c (qotdfile): New global. (pies_keywords): New keyword "qotd-file".
2009-11-24Implement inetd connection rate.Sergey Poznyakoff4
* src/pies.h (struct component): New member "max_rate". (default_max_rate): New extern. * src/progman.c (check_rate): New function. (check_spawn_rate, check_connection_rate): New functions. (prog_open_socket): New function. (prog_start): Rewrite using the above functions. (_prog_accept): Check connection rate. (progman_start): Special handling for inetd listeners. (progman_wake_sleeping): Likewise. * src/pies.c (default_max_rate): New global. (component_keywords): New keyword max-rate. (options): New option "rate". (parse_opt): Handle the new option. * src/inetd.c (inetd_conf_file): Set max_rate, instead of max_instances.
2009-11-24Implement parsing of inetd.conf files.Sergey Poznyakoff7
* src/Makefile.am (pies_SOURCES): Add inetd.c. * src/inetd.c: New file. * src/pies.c (inetd_mode): New global. (str_to_socket_type): New function. (_cb_socket_type): Use str_to_socket_type. (_cm_include_meta1): Rename to _cb_include_meta1. (_cb_include_inetd): New function. (pies_keywords): New keyword "include-inetd". (options): New option --inetd. (main): Handle inetd mode. * src/pies.h (str_to_socket_type): New proto. (disable_socket, enable_socket): Fix return type. * src/progman.c (redirect_to_file): Avoid coredump on privs.user == NULL. (open_redirector,env_setup) (progman_start,run_command): Remove unneeded variable. (progman_start): Fix diagnostic message. * src/socket.c (disable_socket, enable_socket): Fix return type. Do nothing if fd < 0. * src/userprivs.c (switch_to_privs): Allow to pass uid==0.
2009-11-24Handle non-stream sockets. Pies can now replace inetd (- inetd.conf and ↵Sergey Poznyakoff5
built-in services). * src/pies.c (component_keywords): New keywords: wait, socket-type. (component_verify): Add more checks. * src/pies.h (CF_WAIT): New define. (struct component): New member: socket_type. (struct pies_url): Rename proto to scheme. New members: proto, proto_s, port_s (register_listener): Remove proto. (register_socket): New proto. (create_socket): Change signature. (disable_socket, enable_socket): New protos. * src/progman.c (close_fds): New function. (open_redirector): Use close_fds. (prog_start): Use close_fds. Update call to create_socket. Disable socket if wait is set. (progman_accept): Support non-stream (and stream+wait) sockets. (component_fixup_depend): Update call to create_socket. Call register_socket. (run_command): Use close_fds. Re-enable socket if wait is set. * src/socket.c (create_socket): Take additional argument: socket_type. (register_socket): New function. (disable_socket, enable_socket): New functions. (pies_pause): Add missing break. * src/url.c (url_parse_host): Accept service name and numberic port number. (url_parse_proto): Rename to url_parse_scheme. All callers updated. (url_parse_scheme): Allow for optional protocol specification in scheme field (after a '+' sign). (pies_url_destroy): Free new fields.
2009-11-23Limit number of instances for inetd-style components.Sergey Poznyakoff3
* src/pies.c (component_keywords): New keyword `max-instances'. * src/pies.h (struct component): New member: max_instances. * src/progman.c (struct prog): Rename count to failcount. All uses changed. New members num_instances and listener. (progman_accept): Keep track of the number of instances. Deny connection if it is greater than max_instances (unless the latter is 0). (progman_cleanup): Keep track of the number of instances in inetd listeners.
2009-11-23Minor change.Sergey Poznyakoff4
* src/pies.h (CF_DISABLED) (CF_PRECIOUS): New defines. (struct component): Replace precious and disabled by a bitmask member `flags'. All uses updated. * src/progman.c: Reflect the above change. * src/pies.c (_cb_bitmask): New function. (_cb_precious, _cb_disabled): New callbacks. (component_keywords): Change handling of precious and disabled. * bootstrap.conf: Add Emacs mode marker
2009-11-22Take translations from the TP.Sergey Poznyakoff1
2009-11-09Minor change.Sergey Poznyakoff3
* src/depmap.c (struct pies_depmap.nrows,rowlen): Change type to size_t. (depmap_alloc, depmap_rowptr) (depmap_set, depmap_isset) (depmap_next, depmap_first): Use size_t to index map elements. * src/pies.h: Update prototypes accordingly. * src/progman.c: Update depmap function usage.
2009-10-29Fix doc/CommitSergey Poznyakoff2
* doc/Commit (gray_print_section): Output anchors before chapter/section/etc. titles, so that the heading menu in monolithic document works properly.
2009-10-26Rearrange structures prog and component.Sergey Poznyakoff3
* config_array_to_argv (config_array_to_argv): Take four arguments. Return argc in the memory location pointed to by the 4th one (unless NULL). All callers updated. (_cb_command): Fill both comp->argv and comp->argc. (component_keywords): Pass pointer to struct component to _cb_command. * src/pies.h (struct component): New member `argc'. * src/progman.c (struct prog): Move idx to v.p; change its type to unsigned. Remove v.p.argc. All uses updated. (numprog): Rename to numcomp; change type to unsigned. (prog_lookup_by_idx): Check only elements of type TYPE_COMPONENT.
2009-10-26Register mailers and `exec' actions in the prog list.Sergey Poznyakoff2
* src/pies.c (return_code_keywords): Fix docstring wording. * src/progman.c (prog_type): New enum. (struct prog): New union member `c'. (IS_PROG): Rename to IS_COMPONENT. (destroy_prog): Handle TYPE_COMMAND. (register_command): New function. (wait_for_child): Remove. (propagate_child_exit): New function. (wordsplit_string): New function. (send_msg): Register command. In child: Reset all signals; call propagate_child_exit. (run_command): Do not reset SIGPIPE. Register command. (progman_cleanup): Handle TYPE_COMMAND. (progman_stop_component): For sleeping components, reset v.p.count. (progman_dump_stats): Handle TYPE_COMMAND.
2009-10-26Improve diagnostic output.Sergey Poznyakoff4
* src/diag.c (diag_output): New variable. (diag_setup): New function. (vlogmsg): Use diag_output to decide where to output the message. Output to both stderr and syslog if diag_output says so. * src/pies.c (log_to_stderr): Rename to log_to_stderr_only. All uses changed. (log_setup): Remove. (main): Use diag_setup to initialize diagnostics. * src/pies.h (log_to_stderr): Remove. (DIAG_TO_SYSLOG, DIAG_TO_STDERR): New defines. (diag_setup): New function.
2009-10-26Minor changesSergey Poznyakoff3
* doc/Config (EXTRA_HEAD, AFTER_BODY_OPEN): Use qq{} to quote contents. * doc/fdl.texi: Upgrade to v.1.3. * doc/pies.texi: Likewise.
2009-10-26Pies dubbed a GNU package. Update all files accordingly.Sergey Poznyakoff35
2009-10-20Minor fix.Sergey Poznyakoff1
* doc/Config: Fix links in the main menu.
2009-10-20Version 1.1release-1.1Sergey Poznyakoff2
* configure.ac, NEWS: Raise version number.
2009-10-20Fix diagnostics.Sergey Poznyakoff7
* po/POTFILES.in: Add missing files. * src/acl.c, src/meta1lex.l, src/pies.c, src/progman.c, src/socket.c, src/userprivs.c: Fix diagnostic messages.
2009-10-19Update.Sergey Poznyakoff2
* doc/Config, doc/gendocs_template: Update for the new layout.
2009-10-19Updates.Sergey Poznyakoff2
* src/meta1lex.l (%top): Include config.h to accomodate for the latest gnulib. This requires flex >= 2.5.30 * grecs: Upgrade.
2009-10-19Account for possible system clock inaccuracies.Sergey Poznyakoff4
* src/pies.h (progman_wake_sleeping): Takes one argument. * src/progman.c (progman_wake_sleeping): Takes one argument. Account for possible clock inaccuracy. (progman_cleanup): Print correct signal number in the diagnostics. Update call to progman_wake_sleeping. * src/pies.c (main): Update call to progman_wake_sleeping.
2009-10-18Imrove the docs.Sergey Poznyakoff4
* doc/Config: New file. Configuration for texi2html. * doc/Makefile.am (manual): Update rule. (man-tar): New rule. * doc/gendocs_template: Rewrite using the new site layout. * doc/pies.texi: Minor changes.
2009-10-17Release 1.0.release-1.0Sergey Poznyakoff3
* NEWS: Update. * bootstrap.conf: Call submodule init unconditionally. * doc/pies.texi: Minor changes.
2009-10-16Bugfixes.Sergey Poznyakoff2
* src/acl.c (acl_hasher): Fix signature. * src/progman.c (notify): Fix warnings.
2009-10-16Move to grecs master.Sergey Poznyakoff1
2009-10-16Improve diagnostics output.Sergey Poznyakoff5
* configure.ac (AC_CHECK_FUNCS): Remove checks for unused functions. * gnulib.modules: Add fprintftime. Remove quote. * src/pies.c (pidfile_read): Do not print error message if 'No such process' is returned. (main): Set default quoting style to shell. * src/pies.h: Include fprintftime.h. * src/progman.c (prog_start, progman_dump_stats): Quote arguments on output. (progman_dump_stats): Use fprintftime.
2009-10-16Move to grecs master.Sergey Poznyakoff1
2009-10-16Implement -D and -U options (preprocessor control).Sergey Poznyakoff6
* Makefile.am (dist-hook,alpha,alphacheck): New rules. (ChangeLog): Be silent. * NEWS: Update. * doc/pies.texi: Update. * gnulib.modules: Add quote and quotearg * src/pies.c: Implement -D and -U options. Improve --help output. * src/pies.h: Include quotearg.h
2009-10-16Various improvements.Sergey Poznyakoff8
* configure.ac (AC_CHECK_FUNCS): Check for vsyslog. * src/diag.c (syslog_printer) [!HAVE_VSYSLOG]: call syslog. * src/pies.c (component_keywords): Remove settle-timeout, replace it with pass-fd-timeout. (main): Force syslog logging if !foreground. Do not close first three fds before restarting if log_to_stderr is set. * src/pies.h (DEFAULT_PASS_FD_TIMEOUT): New constant. (struct component): Replace settle_timeout with pass_fd_timeout. All uses changed. (pass_fd): Pass timeout as argument. * src/progman.c (prog_start): Remove hardcoded sleep before calling pass_fd. Update call to pass_fd. (prog_start_prerequisites): Remove handling of settle_timeout. * src/socket.c (open_unix_socket): Remove. (pass_fd): Rewrite. * doc/pies.texi: Update.
2009-10-15Proofread the docs.Sergey Poznyakoff2
* doc/pies.texi: Final cleanup. * doc/usr-acl.texi: Minor fix.
2009-10-15More fixes.Sergey Poznyakoff2
* doc/pies.texi: More fixes. * pp-setup: Remove MFD leftovers.
2009-10-15Various fixes.Sergey Poznyakoff8
* README: Fix typo. * doc/usr-acl.texi: New file. * doc/Makefile.am (pies_TEXINFOS): Remove pies.texi, add usr-acl.texi (check-config, check-sub-config): Handle @deffnx * doc/pies.texi: Update. * src/Makefile.am (AM_CPPFLAGS): Remove superfluous defs, use ../gnu/configmake.h instead * src/acl.c (_acl_common_section_parser): Handle tag, depending on the value of `flag' parameter. Avoid coredumping on NULL pacl. (acl_section_parser, defacl_section_parser): Update calls to _acl_common_section_parser. * src/pies.c (STATEDIR): Replace with LOCALSTATEDIR. (GRECS_VALUE_IS_EMPTY): New define (possibly belongs to grecs more than to pies). (assert_grecs_value_type) (return_code_section_parser): Use GRECS_VALUE_IS_EMPTY to check for empty value. (_get_array_arg): Bugfix. (component_keywords, pies_keywords): Add missing docstrings. * src/progman.c (TYPE_RETR): Rename to TYPE_REDIRECTOR. All uses updated.
2009-10-14Minor changes.Sergey Poznyakoff3
* doc/Makefile.am (check-sub-config): Silent the rule. * doc/pies.texi: Update. * src/progman.c (default_termination_message): Use ${termination} (notify): Fix wording in ${termination}.
2009-10-14Fix ACL code.Sergey Poznyakoff3
* src/acl.c (pies_acl_create): Accept NULL name. (_parse_sockaddr): Fix calculation of netmask. (_acl_common_section_parser): New function. (acl_section_parser): Rewrite using _acl_common_section_parser. (defacl_section_parser): New function. (_check_sockaddr): Bugfix. (_acl_check): Break the loop when _check_sockaddr returns 1. (pies_acl_check): Break the loop when _acl_check_cb returns 1. * src/acl.h (defacl_section_parser): New prototype. * src/pies.c (component_keywords): New keyword defacl.
2009-10-13Bugfixes.Sergey Poznyakoff6
* README: Update. * configure.ac: Change bug-reporting address. * doc/pies.texi: Minor fixes. * src/pies.c: New configuration statements: mailer-program and mailer-command-line. (mailer_program, mailer_command_line) (mailer_argc, mailer_argv): New globals. * src/pies.h (mailer_program, mailer_command_line) (mailer_argc, mailer_argv): New globals. * src/progman.c (destroy_prog): Bugfix: update master program when destroying a retranslator. (send_msg): Several bugfixes. Use mailer_argc, mailer_argv instead of hardcoding sendmail command line. Remove invalid recipient addresses from the resulting command line.
2009-10-12Fix make distcheck and check-docs.Sergey Poznyakoff17
* doc/Makefile.am: Fix `check-*' goals. * doc/pies.texi: Update and rearrange material. Document new configuration. * lib/Makefile.am (libpies_a_SOURCES): Remove nls.c * src/Makefile.am (EXTRA_DIST): Remove pies.rc, add pp-setup. (INCLUDES): Add $(top_builddir)/gnu * src/pies.c: Minor changes. * src/progman.c: Minor changes. * README-hacking: New file.
2009-10-12Do not require Mailutils. Provide missing functions.Sergey Poznyakoff24
* Makefile.am (ACLOCAL_AMFLAGS): Add grecs/am * bootstrap.conf: Skip po. Initialize submodule. * configure.ac: Mailutils no longer needed. (AC_CONFIG_FILES): Add new subdirs. * gnulib.modules: Add more modules. Arrange entries alphabetically. * lib/Makefile.am: Rename library to libpies. * lib/libpies.h (mf_privs) (switch_to_privs, get_user_groups) (mf_priv_setup, mf_epriv_setup): Move to src/pies.h (config_array_to_argv, config_array_to_string) (config_cb_timeout): Remove. (tokendef): New struct. (strtotok_len, strtotok_len_ci) (strtotok, strtotok_ci, toktostr): New prototypes. * lib/nls.c: Remove call to mu_init_nls. * src/acl.c: New file. * src/addrfmt.c: New file. * src/diag.c: New file. * src/meta.c: New file. * src/url.c: New file. * src/userprivs.c: New file. * src/acl.h: New file. * src/pp-setup: New file. * src/Makefile.am (pies_SOURCES): Add acl.c, addrfmt.c, diag.c, meta.c, url.c, userprivs.c. (noinst_HEADERS): Add acl.h. (inc_DATA): Add pp-setup. * src/limits.c, src/meta1gram.y, src/meta1lex.h, src/meta1lex.l, src/pies.c, src/pies.h, src/progman.c, src/socket.c, src/userprivs.c: Remove calls to functions from Mailutils.
2009-09-15Branch off from the Mailfromd project into a separate repository.Sergey Poznyakoff38
2009-09-03Improve the upgrade conversion script. Update docs.Sergey Poznyakoff1
* NEWS: Update. * doc/Makefile.am (check-config, check-sub-config): New goals. (all-check-docs): Depend on the above. * doc/mailfromd.texi: Document syslog-async configuration statement. * doc/pragma-option.texi: Move the ignore block to doc/mailfromd.texi. * doc/upgrade.texi (5x0-600): Describe the changes and the proposed conversion procedure. * mfd/main.c (rename_legacy_file): new variable. (close_change_conf): Improve the created script. (cb_db_expire_interval): Bugfix. (database_section_param): File statement is mu_cfg_callback. (main): Set rename_legacy_file if necessary.
2009-09-03Define the `database' configuration statement. Document new configuration.Sergey Poznyakoff1
* doc/pragma-option.texi: New file. * doc/pragma-database.texi: New file. * doc/Makefile.am (mailfromd_TEXINFOS): Add new files. * doc/mailfromd.texi: Document configuration file. * doc/upgrade.texi (5x0-600): New section. * mfd/gram.y (pragma_database): Add calls to write_db_config. * mfd/main.c (write_db_config): New function. (close_change_conf): Handle 'G' records. (cb_relay_file): Remove duplicate function. (cb_db_expire_interval, cb_db_positive_expire_interval) (cb_db_negative_expire_interval): New functions. (database_section_param): New configuration file statement: "database". (database_cfg_init): New function. (main): Call database_cfg_init. * mfd/mailfromd.h (write_db_config): New prototype.
2009-08-27Fix diagnostic and help messages.Sergey Poznyakoff2
1. Option descriptions in `--help' output do not constitute conceptual sentences. Therefore, they should not begin with a capital letter, nor end with a final point. 2. According to standards.texi, a diagnostic message in a non-interactive program "should not begin with a capital letter when it follows a program name and/or file name, because that isn't the beginning of a sentence. (The sentence conceptually starts at the beginning of the line.) Also, it should not end with a period." Affected files: * gacopyz/gacopyz.c * gacopyz/proc.c * gacopyz/server.c * gacopyz/smfi.c * mfd/bi_db.m4 * mfd/bi_dns.m4 * mfd/bi_io.m4 * mfd/bi_ipaddr.m4 * mfd/bi_mail.m4 * mfd/bi_other.m4 * mfd/bi_poll.m4 * mfd/bi_sa.m4 * mfd/bi_string.m4 * mfd/cache.c * mfd/db.c * mfd/dnscache.c * mfd/drivers.c * mfd/engine.c * mfd/gram.y * mfd/lex.l * mfd/main.c * mfd/mu_dbm.c * mfd/optab.opc * mfd/prog.c * mfd/rate.c * mfd/symtab.c * mtasim/mtasim.c * mtasim/openat-die.c * pies/pies.c * pies/progman.c * pmult/pmult.c * smap/smap.c * tests/ashadow.at * tests/bctx00.at * tests/fctx00.at * tests/hdr-gete.at * tests/invcidr.at * tests/invcidr2.at * tests/shadow.at
2009-08-27Minor fixes.Sergey Poznyakoff2
* mfd/main.c (parse_opt): Add missing break. (cb_include_path): Fix use of improper variable in MU_CFG_LIST branch. * am/aggr.m4 (IU_CHECK_MEMBER): Remove improper use of dnl. * doc/Makefile.am (check-builtins, check-mflib): Do not split sed expressions over multiple lines: Makefile format cannot handle it properly. * doc/mailfromd.texi: Update. * bootstrap: Do not apply `silentize' to gnu/gnulib.mk. Latest gnulib takes care of it itself.
2009-08-18Implement getpw.* interfacesSergey Poznyakoff1
* mfd/bi_getpw.m4: New file. * mfd/Makefile.am (M4_FILES): Add bi_getpw.m4 * doc/Makefile.am (check-builtins): Take into account @deftypefnx * NEWS, doc/mailfromd.texi: Update
2009-06-17Bugfixes.Sergey Poznyakoff1
* pies/pies.c (main): Change main loop to do..while, otherwise a signal arriving before entering the loop might cause the program to terminate. * pmult/pmult.c (internal_macro_p): New function. (collect_stage_symbols): Do not report internal macros as untranslatable. * mfd/gram.y (register_macro): Copy macro name to allocated storage.
2009-06-14Fix and improve termination actions in pies.Sergey Poznyakoff4
* pies/pies.h (MAX_RETURN_CODE): Remove. (STATUS_SIG_BIT, STATUS_CODE): New defines (struct action): New fields next, nstat, status, command. (struct component): Keep singly-linked list of termination actions. * pies/progman.c (run_command): New function. (progman_cleanup): Redo iteration over termination actions. * pies/pies.c (return_code_cfg_param): Pass offsets in struct component. (create_action): Accept signal numbers (SIG.* or SIG\+[0-9]+) in tag. (return_code_section_parser): Update. (pies_check_status): Set *pid before returning pies_status_stale. * doc/pies.texi: Document changes. * NEWS: Updated.
2009-06-04MeTA1-related improvements.Sergey Poznyakoff1
* configure.ac: Check for pmilter_S.pmfi_thrmax_[sh]. Requires 28/0009-pmilter-configurable-maxthr.diff. * pmult/pmult.c: New configuration statements: max-threads-soft and max-threads-hard. * pies/pies.c (_cm_include_meta1): Fix coredump on syntax errors in meta1.conf.
2009-05-21More work on `silent rules' modeSergey Poznyakoff3
* bootstrap (silent_rules_prog): Preserve leading whitespace verbatim, when inserting the AM_V variables. Suggested by Ralf Wildenhues. Optionally insert the definitions of AM_DEFAULT_VERBOSITY, AM_V_GEN and AM_V_at: useful for po/Makefile.in.in (silentize): New function. (slurp): Call silentize Call silentize on po/Makefile.in.in. * doc/Makefile.am, etc/Makefile.am, pies/Makefile.am, pmult/Makefile.am, tests/Makefile.am, tests/etc/Makefile.am: Add silent rule markers.
2009-05-21Switch to `silent rules' modeSergey Poznyakoff1
* bootstrap (slurp): Convert gnulib Makefile.am to support silent rules. * configure.ac (AM_INIT_AUTOMAKE): Add silent-rules. Enable silent rules by default. * gacopyz/Makefile.am, mfd/Makefile.am: Add silent rules markers.
2009-05-13Minor changeSergey Poznyakoff1
* mfd/bi_db.m4: Fix comment. * pies/progman.c: Use _exit in child processes. This is a work over a fault in MU design: it registers the pidfile removal function via atexit.
2009-05-09Fix the docsSergey Poznyakoff1
2009-05-06Minor changes.Sergey Poznyakoff2
* NEWS: Update. * doc/mailfromd.texi: Reorder material. * doc/upgrade.texi: New file. * doc/fdl.texi, doc/gacopyz.texi, doc/strftime.texi: Move sectioning commands to the main source. * etc/mailfromd.rc: Reflect recent changes. * mfd/lex.l: Change semantics of __statedir__ and __preproc__. Introduce __defstatedir__ and __defpreproc__.

Return to:

Send suggestions and report system problems to the System administrator.