aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFiles
2008-11-15Improve handling of program privileges.Sergey Poznyakoff2
* lib/libmf.h (struct mf_privs): New data type. (get_user_groups, mf_priv_setup, mf_epriv_setup): New prototypes. * lib/userprivs.c (get_user_groups, mf_priv_setup) (mf_epriv_setup): New functions. * smap/smap.c: If user is specified, switch to effective uid/gid, in order for msrv to create files with right privileges, on one hand, and to be able to create pidfile in root-owned directories (e.g. /var/run), on the other hand. This requires todays snapshot of Mailutils. * pies/pies.h (struct pies_privs_data): Remove (struct component): Change type of `privs' to struct mf_privs. (priv_setup): Remove. * pies/pies.c: Use mf_priv* stuff to manipulate privileges. * pies/progman.c: Likewise. * pies/meta1gram.y (list): allow for trailing comma. git-svn-id: file:///svnroot/mailfromd/trunk@1751 7a8a7f39-df28-0410-adc6-e0d955640f24
2008-11-13Bugfix.Sergey Poznyakoff1
* lib/proctitle.c (mf_proctitle_format): * pies/progman.c (progman_register_retranslators): Register retranslators only for retr_syslog. (open_retranslator): Do not prepend program name to the proctitle. It is done automatically by the library. * lib/proctitle.c: Declare environ. Define __progname if not defined in libc. (mf_proctitle_init): Set __progname. (mf_proctitle_format): Prepend program name to the proctitle. git-svn-id: file:///svnroot/mailfromd/trunk@1748 7a8a7f39-df28-0410-adc6-e0d955640f24
2008-11-13Implement file output redirection.Sergey Poznyakoff2
* pies/pies.h (enum retr_type): New constants. (struct retranslator): New type. (struct component): Change type of retr to struct retranslator. All uses updated. * pies/pies.c (_cb_retr): Takes two arguments: redirection type and file name or syslog priority. (make_full_name): New function. (component_verify): Check retr file names. * pies/progman.c (redirect_to_file): New function. (open_retranslator): Handle file redirects. (prog_start): Open /dev/null in wronly mode. * pies/meta1gram.y (create_retr_node): New function. (translate_node_list): Create default "stderr" statement. git-svn-id: file:///svnroot/mailfromd/trunk@1747 7a8a7f39-df28-0410-adc6-e0d955640f24
2008-11-13Implement setproctitle functionality for pies.Sergey Poznyakoff3
* am: New directory. * am/aggr.m4, am/debug.m4: New files (from acinclude.m4) * am/proctitle.m4: New file. * acinclude.m4: Removed. * configure.ac: Call MF_PROCTITLE. * lib/libmf.h (mf_proctitle_format): New prototype. * lib/proctitle.c: New file. * lib/Makefile.am (libmf_a_SOURCES): Add proctitle.c. * Makefile.am (ACLOCAL_AMFLAGS): Add -I am * pies/pies.c (main): Call mf_proctitle_init. * pies/progman.c (retr_tag): Rewrite in a safer way. (open_retranslator): Set program title in child. git-svn-id: file:///svnroot/mailfromd/trunk@1746 7a8a7f39-df28-0410-adc6-e0d955640f24
2008-11-10Rewrite pies to incorporate into it the functionality of inetd and mcp.Sergey Poznyakoff1
* pies/pies.c (pmult_debug): Rename to pies_debug. (pies_acl): New global. (component_cfg_param): New statements: mode, socket, pass-fd-socket, acl, limits. (component_section_parser): Allocate comp. Check its consistency on mu_cfg_section_end. (pies_cfg_param): New statement: acl. (main): Call mu_acl_cfg_init. Use pies_pause instead of pause. * pies/limits.c: New file. * pies/progman.c (enum prog_status): New status: status_listener. (struct prog): Keep a pointer to the original struct component, instead of copying its fields (except for depend, which is copied anyway). All uses updated. (prog_lookup_by_socket, unlink_prog, register_prog0): New functions. (prog_start, progman_cleanup, progman_stop_component): Rewrite to take into account various component modes. (pies_check_acl): New function. (progman_accept): New function. * pies/pies.h (limits_record_t): New typedef. (enum pies_comp_mode): New constants. (struct component): New members: mode, limits, socket_url, pass_fd_socket, acl. (progman_accept): New proto. (pies_pause, register_listener, pass_fd, open_socket) (parse_limits, set_limits): New protos. * pies/Makefile.am (pies_SOURCES): Add limits.c and socket.c * pies/socket.c: New file. * configure.ac: Check for msg_control and msg_accrights in struct msghdr. * acinclude.m4 (IU_CHECK_MEMBER, IU_CHECK_MEMBERS): New macros (from inetutils). git-svn-id: file:///svnroot/mailfromd/trunk@1733 7a8a7f39-df28-0410-adc6-e0d955640f24
2008-10-15* pies/progman.c (env_setup): Port new implementation from Rush.Sergey Poznyakoff1
* gnulib.modules: Add c-ctype * mtasim/mtasim.c, pies/pies.h, pmult/pmult.c, lib/parsetime.c, mfd/lex.l, mfd/gram.y, mfd/mailfromd.h, mfd/spf.c, mfd/bi_sprintf.m4, mfd/bi_io.m4, mfd/pp.c, mfd/main.c: Use c-ctype, instead of ctype. git-svn-id: file:///svnroot/mailfromd/trunk@1700 7a8a7f39-df28-0410-adc6-e0d955640f24
2008-09-29Fix MU configuration file support.Sergey Poznyakoff3
* lib/libmf.h (config_array_to_argv) (config_array_to_string, config_cb_timeout): new prototypes. * lib/utils.c: New * lib/Makefile.am (libmf_a_SOURCES): Add utils.c * mfd/gram.y (defer_initialize_variable): Both args are const. * mfd/mailfromd.h (defer_initialize_variable) (add_include_dir): Change signatures. * mfd/pp.c (add_include_dir): Arg is const. * pies/pies.c, pmult/pmult.c, mfd/main.c: Rewrite configuration file support to match changes in Mailutils. git-svn-id: file:///svnroot/mailfromd/trunk@1680 7a8a7f39-df28-0410-adc6-e0d955640f24
2008-02-10Merged HEAD from branches/gmachSergey Poznyakoff10
git-svn-id: file:///svnroot/mailfromd/trunk@1612 7a8a7f39-df28-0410-adc6-e0d955640f24

Return to:

Send suggestions and report system problems to the System administrator.