aboutsummaryrefslogtreecommitdiff
path: root/src/userprivs.c
AgeCommit message (Collapse)AuthorFiles
2019-05-23Update copyright yearsSergey Poznyakoff1
2017-01-02Happy GNU YearSergey Poznyakoff1
2016-01-21Cleanup: redo configuration file handling and dependency tracking.Sergey Poznyakoff1
Implement clean configuration reload on SIGHUP. Use SIGUSR1 to restart the program (previously initiated by SIGHUP). * src/Makefile.am (pies_SOURCES): Add comp.c * src/comp.c: New file. * src/acl.c (pies_acl_free): Don't coredump on NULL arg. (_parse_from): Set cmp function for the sockaddr list. (_acl_common_section_parser): Set cmp function for the ACL (pies_acl_cmp): New function. * src/acl.h (pies_acl_cmp): New proto. * src/cmdline.opt: Remove option --dump-prereq. Add options --trace-prereq and --trace-depend. * src/ctl.c: Use prog_tag to access tag of struct prog. * src/depmap.c (depmap_clear) (depmap_clear_all): New functions. * src/inetd.c (inetd_conf_file): Don't register prog right away. This is done later in component_config_commit. (inetd_parse_conf): Rename to inetd_config_parse. * src/limits.c (limits_cmp): New function. * src/pies.c (config_file): Replace with struct config_syntax. (str_to_config_syntax): Return a pointer to struct config_syntax. (add_config): Rename to config_file_add. (config_file_add_type): New function. (return_code_keywords, create_action): Change handling of actions. (return_code_section_parser): Likewise. (component_verify, component_create) (component_free, component_finish): Move to comp.c (config_parse): Remove. (pies_config_parse): New function. (pies_read_config,pies_reload): New function. (pies_reload): Rename to request_reload. (pies_status): Rename to request_status. (pies_stop): Rename to request_stop. (main): Change configuration file handling. SIGHUP reloads configuration, instead of restarting the program. (default_sigv,sig_handler): Handle SIGUSR1. * src/pies.h (component): New members: prev, next, listidx, arridx, ref_count, prog. Remove act_head, act_tail, act_temp. Add new prototypes. * src/prog.h (prog): Remove tag and prereq. * src/progman.c (prog_tag): New function. (destroy_prog): Update component reference count. (register_redir): Likewise. (register_prog0): Take one argument. Update component reference count. (register_prog): Update comp->prog (prog_rebuild_prerequisites): Remove. (component_fixup_depend): Remove. (fixup_prerequisites,rebuild_prerequisites) (print_dep,progman_dump_prereq) (progman_dump_depmap,progman_build_depmap): Remove. (prog_start_prerequisites): Scan depmap to find prerequisites. (prog_stop_dependents): Likewise. (progman_wait): Remove. (progman_wait_until): New function. (progman_stop): Rewrite using progman_wait_until. (react): Rewrite using grecs_list * src/sysvinit.c: Use prog_tag when needed. * src/userprivs.c (pies_privs_cmp, pies_privs_free): New functions. * grecs: Update. * lib/safe_strcmp.c: New file. * lib/Makefile.am: Add safe_strcmp.c * lib/libpies.h (safe_strcmp): New proto.
2016-01-08Uniformly use grecs memory management functions.Sergey Poznyakoff1
* gnulib.modules: Remove unneded modules. * ident/ident.h: Remove xalloc.h, include errno.h * ident/ident.c: Use standard allocation functions instead of x* * ident/pam.c: Remove. * ident/provider.c: Remove. * ident/system.c: Remove. * src/meta.c: Remove. * src/Makefile.am: Remove meta.c * src/progman.c: Use grecs_* allocation functions instead of x*. (notify): Use wordsplit to expand variables within message. Rename variables: program-name to program_name; canonical-program-name to canonical_program_name. * doc/pies.texi: Update. * src/depmap.c: Use grecs_* allocation functions instead of x*. (depmap_end): New function. * src/diag.c (logmsg_vprintf): Use grecs_txtacc instead of obstack. * src/pies.h (depmap_end): New proto. Remove unused includes. * src/acl.c: Use grecs_* allocation functions instead of x*. * src/ctl.c: Likewise. * src/inetd.c: Likewise. * src/limits.c: Likewise. * src/meta1gram.y: Likewise. * src/meta1lex.l: Likewise. * src/pies.c: Likewise. * src/socket.c: Likewise. * src/sysvinit.c: Likewise. * src/userprivs.c: Likewise.
2014-12-27Minor fixes.Sergey Poznyakoff1
* lib/proctitle.c (mf_proctitle_format): Check return from vasprintf instead of checking the return pointer. * src/inetd-bi.c: Check return values from write where reasonable. * src/progman.c (redirect_to_file): Check return from chown. (close_fds): Fix coredump (upper boundary was wrong). (open_redirector, progman_dump_stats): Check return values. * src/sysvinit.c (sysvinit_setenv): Remove unused variable. * src/userprivs.c (str_eq, str_dispose): Remove unused functions. * src/utmp.c: Check return values.
2013-01-06Update copyright years.Sergey Poznyakoff1
2011-10-23Switch to the latest Grecs.Sergey Poznyakoff1
* Makefile.am (ChangeLog): Use git2chg.awk to build it. * NEWS: Update. * bootstrap.conf (gnulib_modules): Grecs does not depend on gnulib any more. * configure.ac: Version 1.2.90. Define GRECS_HOST_PROJECT_INCLUDES, remove grecs Makefiles from AC_CONFIG_FILES: it is now done by GRECS_SETUP itself. * gnulib.modules (gitlog-to-changelog,argp): Remove. (configmake): New module. * grecs: Update to a52ab6c6. * lib/libpies.h: Remove redefinitions of _() and N_(). * src/Makefile.am: Update for the recent grecs. * src/acl.c: Rewrite using Grecs support for lists and symtabs. * src/acl.h: Likewise. * src/diag.c: Likewise. * src/inetd.c: Likewise. * src/meta1gram.y: Likewise. * src/meta1lex.h: Likewise. * src/meta1lex.l: Likewise. * src/pies.c: Likewise. * src/pies.h: Likewise. * src/progman.c: Likewise. * src/userprivs.c: Likewise.
2010-01-02Update copyright years.Sergey Poznyakoff1
Happy GNU Year!
2009-11-24Implement parsing of inetd.conf files.Sergey Poznyakoff1
* 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-10-26Pies dubbed a GNU package. Update all files accordingly.Sergey Poznyakoff1
2009-10-20Fix diagnostics.Sergey Poznyakoff1
* 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-12Fix make distcheck and check-docs.Sergey Poznyakoff1
* 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.

Return to:

Send suggestions and report system problems to the System administrator.