aboutsummaryrefslogtreecommitdiff
path: root/src/directive.c
AgeCommit message (Collapse)AuthorFiles
2023-05-02Add interface for closing file descriptors greater than or equal to the ↵HEADmasterSergey Poznyakoff1
given one.
2023-05-02Remove uses of obsolete and obsolescent autoconf macros.Sergey Poznyakoff1
2022-06-01Support arbitrary order of directives in a directive fileSergey Poznyakoff1
* src/cmdline.opt: New option -l (--max-severity). * src/verify.c (fill_project_name): Check directive file format here. * src/wydawca.c (wy_log_max_severity): New global. (wy_vlog): Don't log the message if its severity is greater than wy_log_max_severity. * src/wydawca.h (wy_log_max_severity): New extern. * src/directive.c (verify_directive_format): Rewrite. Process the replace directive here. * tests/Makefile.am: Add new file. * tests/testsuite.at: Include new file. * tests/atlocal.in (wy_create_directive): New option -c: create initially empty file. * tests/dry_run01.at: Update expected text. * tests/upload01.at: Likewise. * tests/upload04.at: Test whether replace directory works no matter what its position relative to filename directive. * tests/verify.at: New file. * NEWS: Update. * grecs: Update.
2022-01-25Version 4.0.90Sergey Poznyakoff1
* NEWS: Document changes. * configure.ac: Raise patchlevel number. * src/directive.c (run_check_script): Remove improperly used static qualifier. * src/triplet.c: Fix indenting.
2022-01-13Update copyright yearsSergey Poznyakoff1
2021-04-09Run the distribution verification script in a separate temporary directory.Sergey Poznyakoff1
The temporary directory is removed when the script terminates. * src/directive.c (run_check_script): Create a separate temporary directory to run the script in. * src/gpg.c (wy_rmdir_r, wy_tempdir): New functions. * src/wydawca.h (wy_rmdir_r, wy_tempdir): New protos.
2021-01-06Update copyright yearsSergey Poznyakoff1
2020-05-17Remove timersSergey Poznyakoff1
2020-04-30Change replace handlingSergey Poznyakoff1
* src/wydawca.h (struct wy_triplet): New member: replace_allowed * src/directive.c (process_directives): Set trp->replace_allowed depending on the directive file version and the "replace" directive. * src/diskio.c (backup_copy): Use trp->replace_allowed * tests/Makefile.am: Add new tests. * tests/testsuite.at: Include new tests. * tests/upload03.at: New test. * tests/upload04.at: New test. * tests/upload05.at: New test.
2020-04-27Use BSD queue macros to implement queues and linked lists.Sergey Poznyakoff1
2020-04-27Minor improvementSergey Poznyakoff1
* src/directive.c (directive_parse): Optimize two sequential directives referring for filename and filename.sig
2020-04-26Minor changesSergey Poznyakoff1
* doc/wydawca.texi: Fix documentation of ${timer:wydawca} * etc/wydawca.rc: Rename to etc/wydawca.conf. Edit. * src/triplet.c: The "wydawca" timer is synonymous to "spool". * src/wydawca.h (WY_TIMER_WYDAWCA): Remove.
2020-04-25Keep statistic items in global array. Use special thread for periodic reportingSergey Poznyakoff1
* src/config.c: New configuration statement stat-report-interval * src/directive.c * src/timer.c: Rewrite statistic counters and functions (wydawca_stat_log,wydawca_stat_init,wydawca_stat_update) (wydawca_stat_notify,wydawca_stat_add): New functions. (wy_thr_stat): New thread (statistics reporter. * src/triplet.c: Remove per-thread statistic counters. * src/wydawca.c (wy_main): Use new statistic calls. Force statistic logging at the end of the run. * src/wydawca.h (DEFAULT_STAT_REPORT_INTERVAL): New constant. (stat_report_interval): New extern. (wy_get_stat_array, wy_get_stat_slot) (wy_get_stat_counter): Remove. (wydawca_stat_log,wydawca_stat_init,wydawca_stat_update) (wydawca_stat_notify,wydawca_stat_add) (wydawca_stat_incr): New protos. (stat_mask_p,logstats,wydawca_stats_export) (wydawca_stats_update): Remove protos.
2020-04-25Fix eventual simultaneous access to the triplet.Sergey Poznyakoff1
The triplet could have been modified by the triplet_remove_file function invoked from the watcher on file delete or moved_from event, triggered by the normal install procedure. * src/wydawca.h (struct wy_triplet): Replace the destroying member with in_processing. * src/triplet.c (triplet_enqueue): Set the "in_processing" member. (remove_triplet_unlocked): Remove the "destroying" flag. (triplet_remove_file): If in_processing is set, don't touch the triplet. * src/directive.c (process_directives): Remove the "destroying" flag. * src/timer.c (timer_stop): Use timer_get to ensure timing is computed. * src/watcher.c: Remove unused structure member.
2020-04-23Remove a left-over global variableSergey Poznyakoff1
2020-04-20Rewrite the timer support.Sergey Poznyakoff1
Timers are kept in a thread-specific array variable. Spool timers are referenced in expansion strings by their fully qualified names, e.g. ${timer:spool:release:system}. * NEWS: Update. * doc/wydawca.texi: Document new syntax for the spool timer variables. * src/directive.c * src/wydawca.h (struct spool): New member: timer_id. * tests/upload-dry.at: Filter out certain messages, that can appear * src/process.c (spool_count): New global. (register_spool): Build spool list in the same order as listed in the configuration file. (spool_timer_id): New function. * src/timer.c: Rewrite using array of struct timer_slot, instead of the hash table. * src/triplet.c (try_timer_var): Rewrite. * src/wydawca.c (stderr_printer): Protect stderr by a mutex. in unpredictable order.
2020-04-18Fix statistics gathering. Display stats at the end of the run in cron mode.Sergey Poznyakoff1
* src/directive.c (process_directives): Raise the 'destroying' flag prior to removing the directive file, in order to avoid the removal being caught by the watcher thread. * src/timer.c (wydawca_stats_export, wydawca_stats_update): New functions. * src/triplet.c (triplet_list_lock,triplet_list_unlock): Check for NULL pointer. (remove_triplet_unlocked): Set the 'destroying' flag. (triplet_remove_file): Do nothing if the 'destroying' flag is set. (wy_thr_triplet): Call logstats only in the daemon mode. Otherwise call wydawca_stats_update. * src/wydawca.c (wy_main): Call wydawca_stats_export at the beginning. Call logstats before exiting, unless in daemon mode. * src/wydawca.h (struct wy_triplet): New member: destroying. (wydawca_stats_export,wydawca_stats_update): New protos. * tests/check-fail.at: Update. * tests/check-notify.at: Update. * tests/upl12f.at: Update.
2020-04-15Replace UPDATE_STATS macro with inline function increase_stat_counterSergey Poznyakoff1
2020-04-15When processing spool requests, handle each completed triplet in spool.Sergey Poznyakoff1
Previously wydawca used to take optional second parameter - a list of submitter UIDs. If given this list, it would process only those triplets that had been uploaded by one of these UIDs. This proved to be unnecessary. The same change is applied to the notification protocol. Only the spool name is required. The second word in the request (user name) is now silently ignored. * src/wydawca.h (struct wy_triplet): Remove const qualifier from the spool member. Remove jq_prev and jq_next pointers. (struct job_spool_id): Remove. (job_schedule_spool): Change signature. * src/job.c (struct job): Replace job_spool with a pointer to spool. (triplet_jq_unlink,jq_clear): Remove. (job_printable): Change formatting of JOB_SPOOL jobs. (job_locate): Update. (wydawca_scanner): Update. * src/net.c (handle_connection): Ignore second word in the request. * src/process.c (spool_add_new_file): Change signature. UIDs are no longer needed. Return a pointer to the affected triplet. (scan_spool): Change signature. * src/triplet.c (register_file): Return pointer to the affected triplet. (check_triplet_state): Remove the noauth parameter. (triplet_enqueue): New function. (triplet_commit): New function. (spool_commit_triplets): Remove the tplist parameter. Process all complete triplets in the spool. (link_processable_triplets): Remove. * src/verify.c (verify_directive_file): Remove the noauth parameter. * src/watcher.c (process_event): Enqueue created triplets. * src/wydawca.c (main): Don't take any UID arguments. * tests/inotify-ok.at: The version statement is printed once. Update the expected output. * tests/inotify-rmsymlink.at: Likewise. * tests/inotify-symlink.at: Likewise. * tests/inotify-unatt01.at: Likewise.
2020-04-13Rewrite diskio function so as not to assume any particular cwdSergey Poznyakoff1
* src/backup.c (get_backup_suffix) (find_backup_file_name): Get directory descriptor as first argument. * src/diskio.c: Rewrite using *at() functions. * src/gpg.c (rmdir_r): Silently skip ENOENT. (verify_detached_signature): push_dir/pop_dir. * src/triplet.c: Don't change to spool->source_dir. Underlying functions don't assume any specific cwd. * src/wydawca.h (find_backup_file_name) (create_hierarchy): Change signatures. All uses changed. * tests/Makefile.am: Add new tests. * tests/testsuite.at: Likewise. (AT_WYDAWCA_DAEMON): Take additional argument. * tests/inotify-rmsymlink.at: New test. * tests/inotify-symlink.at: New test. * tests/rmsymlink00.at: New test. * tests/symlink00.at: New test. * tests/symlink01.at: New test. * tests/dist/rmsymlink.directive.asc: New directive file. * tests/dist/symlink.directive.asc: New directive file.
2020-04-10Change indentation to improve readability.Sergey Poznyakoff1
2020-03-13Version 3.1release-3.1Sergey Poznyakoff1
2019-07-24Use wordsplit to expand variables in strings.Sergey Poznyakoff1
* NEWS: Raise version number. * configure.ac: Link wydawca.h to include/wydawca Raise version number * doc/wydawca.texi: Document changes. * etc/wydawca.rc: Fix the syntax. * grecs: Upgrace. * include/wydawca/wydawca.h (wy_vlog): New proto. (wy_log, wy_dbg): Format is const char *. (wy_triplet_t): Change typedef. (wy_metadef): Remove struct. (wy_vardef): New struct. (wy_triplet_expand_param) (wy_expand_copy): New protos. * modules/logstat/mod_logstat.c: Update. * modules/mailutils/Makefile.am (AM_CPPFLAGS): Modify, * modules/mailutils/mod_mailutils.c: Update. * src/Makefile.am (wydawca_SOURCES): Remove meta.c * src/dictionary.c: Fix comment. * src/directive.c (directive_get_value): Triplet pointer is const. * src/meta.c: Remove. * src/timer.c: (timer_fill_meta) (timer_free_meta): Remove. * src/triplet.c: Use wordsplit for expansions. * src/wydawca.c (wy_vlog): New function. (wy_stat_expansion): New function. * src/wydawca.h: Remove metadef protos. * tests/etc/notify.rcin: Update variable reference syntax.
2019-07-22Finish mod_logstat implementation. Document it.Sergey Poznyakoff1
* doc/wydawca.texi: Document mod_logstat. * include/wydawca/wydawca.h (wy_ev_statistics): Rename to wy_ev_finish. All uses changed. (wydawca_stat): New enum (from src/wydawca.h) (WY_STAT_MASK,WY_STAT_MASK_NONE) (WY_STAT_MASK_ALL): New macros. All uses changed. * modules/logstat/mod_logstat.c (stat_mask): Default to WY_STAT_MASK_ALL. (wy_notify): Provide default output.
2019-07-18Fix unnecessary code duplicationSergey Poznyakoff1
Use grecs_txtacc.
2019-07-15Version 2.99.92Sergey Poznyakoff1
2017-01-02Happy GNU YearSergey Poznyakoff1
2013-03-12Namespace normalization (2). Provide installable headers.Sergey Poznyakoff1
* Makefile.am (SUBDIRS): Add include. * configure.ac: Build include/*/Makefile Set-up grecs as a shared convenience library. Install its headers. * include/Makefile.am: New file. * include/wydawca/Makefile.am: New file. * include/wydawca/cfg.h: New file. * include/wydawca/wydawca.h: New file. * modules/mailutils/Makefile.am (AM_CPPFLAGS): Add include/ * src/Makefile.am (LDADD): Use @GRECS_LDADD@ (AM_CPPFLAGS): Add include/. * tests/Makefile.am: Likewise. * src/wydawca.h: Include wydawca/wydawca.h. (__cat2__, __cat3__): Move to installable header and rename. (struct wy_user): Move to installable header. (struct file_triplet): Rename to wy_triplet. All uses changed. (enum notification_event): Rename to wy_event and move to installable header. (struct metadef): Rename to wy_metadef and move to installable header. (dry_run_mode): Rename to wy_dry_run and move to installable header. (wydawca_gpg_homedir): Rename to wy_gpg_homedir and move to installable header. (wy_version, wy_debug_level, wy_log_to_stderr) (wy_log_facility, wy_syslog_tag) (wy_log,wy_dbg): Move to installable header. * modules/mailutils/mod_mailutils.c: Update. * src/cmdline.opt * src/config.c * src/directive.c * src/diskio.c * src/event.c * src/gpg.c * src/job.c * src/meta.c * src/module.c * src/null.c * src/timer.c * src/triplet.c * src/verify.c * src/vtab.c * src/watcher.c * src/wydawca.c
2013-03-10Provide a convenient debugging macro.Sergey Poznyakoff1
Rename logmsg to wy_log.
2013-03-10Replace mail notification with module event notification framework.Sergey Poznyakoff1
The new framework is to be general-purpose; the mail notification is implemented as a module. Althoug the program is operational, the change is not completed yet. In particular, the docs are out of date and the tests will mostly fail. * .gitignore: Update. * Makefile.am (SUBDIRS): Add modules. * configure.ac: Mailutils is now optional (though highly recommended). (AC_CONFIG_FILES): Build modules/Makefile and modules/mailutils/Makefile. * modules/Makefile.am: New file. * modules/mailutils/Makefile.am: New file. * modules/mailutils/mod_mailutils.c: New file. * src/mail.c: Remove. * src/mail.h: Remove. * src/event.c: New file. * src/Makefile.am (wydawca_SOURCES): Update. (LDADD): Remove MAILUTILS_LIBS. * src/config.c: Remove mail-related configuration statements. Add module-related ones instead. * src/wydawca.h (notification_event) <ev_statistics>: New event. (notification_target): Remove. (notification) <tgt,sign_keys,msg>: Remove. <statmask>: New member. (register_message_template): Remove. (notify_stats,notify_flush): New protos. (notification_target_str): Remove. (format_fn): Remove. (module) <next,modinit,open> <flush,close>: New members. <notify>: Change signature. (modules_close, module_set_init) (module_flush): New protos. (debug_level): Rename to wy_debug_level. All uses changed. (wy_version): New extern. (admin_stat_message,admin_stat_sign_key): Remove. (default_notification): New global. (triplet_expand_param,triplet_expand_dictionary_query): The file_triplet argument is const pointer. (assert_string_arg): Rename to wy_assert_string_arg. * src/wydawca.c (debug_level): Rename to wy_debug_level. (wy_version): New global. (logstats): Call notify_stats. (main): Call modules_close. * src/module.c: Keep modules in a singly-linked list instead of a symtab. Provide new functions. * src/net.c: Update. * src/dictionary.c: Update. * src/directive.c: Update. * src/diskio.c: Update. * src/exec.c: Update. * src/gpg.c: Update. * src/job.c (wydawca_scanner): Call notify_flush. * src/null.c: Update. * src/process.c: Update. * src/sql.c: Update. * src/tcpwrap.c: Update. * src/triplet.c: Update. * src/verify.c: Update. * src/watcher.c: Update.
2013-03-06Replace mu_url_t with a custom URL.Sergey Poznyakoff1
2013-01-01Update copyright years. Switch to a familiar style.Sergey Poznyakoff1
2012-12-30Check returns from pipe, dup2 and chmod. Don't use obsolete MU functions.Sergey Poznyakoff1
2012-05-27Implement upload directives version 1.2Sergey Poznyakoff1
* NEWS: Update. * README: Update. * doc/wydawca.texi: Document changes. * src/cmdline.opt: Update copyright years. * src/config.c: Update for new grecs version. New keywords: min-version and max-version. * src/directive.c (directive_unpack_version): New function. (directive_version_in_range_p): Set trp->version and print it. (directive) <replace_dir>: New directive. (directive_table): New directive "replace". (verify_directive_format): Use globals min_directive_version and max_directive_version. (process_directives): Handle replace_dir * src/diskio.c (dir_move_file): Use the "replace" directive to act on existing files. * src/wydawca.c (min_directive_version) (max_directive_version): New globals. (main): Loosen gpgme requirement: version 1.1.0 is Ok. * src/wydawca.h (MAX_DIRECTIVE_VERSION): Set to 102 (file_triplet) <version>: New member. (min_directive_version) (max_directive_version): New globals. (directive_unpack_version): New proto. * tests/upl11.at: New file. * tests/upl12f.at: New file. * tests/upl12t.at: New file. * tests/Makefile.am (TESTSUITE_AT): Add new files. * tests/atlocal.in (wydawca_upload): Change invocation. All uses updated. (wydawca_cmparc): New function. * tests/check-fail.at: Update. * tests/check-notify.at: Update. * tests/check-ok.at: Update. * tests/dist/file12f.directive.asc: New file. * tests/dist/file12t.directive.asc: New file. * tests/etc/wydawca.rcin (test): Define "archive" clause. * tests/mailstats.at: Update. * tests/notify-upl.at: Update. * tests/testsuite.at: Include new files. * tests/upload-dry.at: Update. * tests/upload.at: Update.
2011-05-13Minor change.Sergey Poznyakoff1
* src/wydawca.c: Setup MU streams properly.
2011-05-13Update copyright yearsSergey Poznyakoff1
2011-05-13Drop gnulib.Sergey Poznyakoff1
* bootstrap: Rewrite. * bootstrap.conf: Remove. * configure.ac: Remove gl_EARLY/gl_INIT * src/backup.c: New file. * src/txtacc.c (txtacc_finish): Make sure a new entry is appended only once to the list. * (all sources): Use grecs memory allocation functions. * src/wydawca.h" Include fnmatch.h and regex.h (backup_type): New enum. (simple_backup_suffix): New extern. (find_backup_file_name): New proto. * tests/bkupname.c: New file. * tests/backup00.at: New file. * tests/backup01.at: New file. * tests/backup02.at: New file. * tests/backup03.at: New file. * tests/Makefile.am: Add new tests. * tests/testsuite.at: Add new tests. * grecs: Update.
2011-05-12Improve the txtacc interface.Sergey Poznyakoff1
2011-05-11Remove obstack.Sergey Poznyakoff1
* src/txtacc.c: New file. * gnulib.modules: Remove obstack. * src/wydawca.h (txtacc_create, txtacc_free) (txtacc_free_string, txtacc_grow) (txtacc_finish): New functions. (txtacc_1grow): New macro.
2010-01-03Improve memory management and optimize function signatures.Sergey Poznyakoff1
* src/wydawca.h (file_triplet): New members: relative_dir, obstk. (virt_tab): Remove spool and reldir from argument lists. (triplet_strdup): New prototype. (move_file, archive_file, symlink_file) (rmsymlink_file, dir_move_file, dir_archive_file) (dir_symlink_file, dir_rmsymlink_file) (null_move_file, null_archive_file) (null_symlink_file, null_rmsymlink_file): Remove spool and reldir from argument lists. * src/directive.c (run_check_script): Use trp->obstk to store the program output. (process_directives): Update calls to vtab interfaces. * src/diskio.c (dir_move_file) (dir_archive_file, dir_symlink_file) (dir_rmsymlink_file): Remove spool and reldir arguments. Use the corresponding members of the struct file_triplet. * src/null.c (null_move_file, null_archive_file) (null_symlink_file, null_rmsymlink_file): Likewise. * src/vtab.c (move_file, archive_file) (symlink_file, rmsymlink_file): Likewise. * src/triplet.c (hash_triplet_free): Free obstack and uploader_list. (triplet_strdup): New function. (register_file): Initialize trp->obstck. (fill_project_name): Fill relative_dir as well. (verify_directive_file): Use triplet_strdup to keep string values.
2010-01-03Do not pass spool as a separate parameter, register it early in the triplet.Sergey Poznyakoff1
* src/directive.c (process_directives): Remove spool parameter. * src/gpg.c (verify_directive_signature) (verify_detached_signature): Remove spool parameter. * src/process.c (scan_spool_unlocked): Update call to register_file. * src/triplet.c (register_file): Take spool ptr as second argument. (triplet_processor): Ignore proc_data. (enumerate_triplets): Pass NULL as proc_data. * src/verify.c (verify_directive_file): Remove spool parameter. * src/wydawca.h (ASGN_SPOOL): New macro. (register_file, verify_directive_file) (verify_directive_signature, verify_detached_signature) (process_directives): Remove spool parameter. * src/getopt.m4 (print_help): Minor fix.
2010-01-02Bugfixes.Sergey Poznyakoff1
* src/directive.c (run_check_script): Close stdin. Call shell as "sh".
2010-01-02Add testcases for distribution tarball checking.Sergey Poznyakoff1
* src/directive.c (run_check_script): Reword diagnostic messages. * tests/check-fail.at: New testcase. * tests/check-notify.at: New testcase. * tests/check-ok.at: New testcase. * tests/Makefile.am: Add new files. * tests/testsuite.at: Include new tests. * tests/atlocal.in (wydawca_init_testdirs): Create three source subdirectories. (wydawca_upload): Treat first argument as the name of a source subdirectory. * tests/etc/notify.rc: Add check-failure notification. * tests/etc/wydawca.rcin (ckfail, ckok): New spools. * tests/mailstats.at, tests/notify-upl.at, tests/upload.at: Update. * tests/upload-dry.at: Update output template.
2010-01-02Implement distribution tarball checking.Sergey Poznyakoff1
* src/config.c (event_args): New event "check-failure" (event_types): New event type ev_check_fail. (spool_kw,wydawca_kw): New keyword check-script. * src/directive.c (save_script) (stderr_redirector,run_check_script): New functions. (external_check): New function. (process_directives): Call external_check before actually moving the files. * src/gpg.c (homedir): Rename to temp_homedir, now global. * src/net.c (trim_crlf): Remove static qualifier. * src/triplet.c (hash_triplet_free): Free check_diag. (expand_triplet_full,expand_triplet_upload) (expand_triplet_sig,expand_triplet_directive): Rename to expand_triplet_ls_full,expand_triplet_ls_upload, expand_triplet_ls_sig,expand_triplet_ls_directive, correspondigly. (expand_check_diagn,expand_check_result) (expand_triplet_dist,expand_triplet_sig) (expand_triplet_dir): New functions. (triplet_meta): Renames: triplet:full => triplet:ls:full triplet:upload => triplet:ls:upload triplet:dist => triplet:ls:dist triplet:sig => triplet:ls:sig triplet:dir => triplet:ls:dir New keywords: triplet:dist, triplet:sig, triplet:dir, check:result, check:diagn. * src/wydawca.c (default_check_script): New global. (stat_name): New statistics counter "check failures". * src/wydawca.h (struct file_triplet): New members check_result, check_diag. (struct spool): New member check_script. (wydawca_stat): New value STAT_CHECK_FAIL. (notification_event): New value ev_check_fail. (default_check_script, temp_homedir): New externs. (concat_dir, copy_file, trim_crlf): New protos. * doc/wydawca.texi: Update. * configure.ac, NEWS: Version 2.0.90
2010-01-01Happy new year!Sergey Poznyakoff1
Updated year in copyright statements.
2009-03-11Start writing wordsplit.Sergey Poznyakoff1
* doc/wydawca.texi: Update. * gconf/argcv.h, gconf/argcv.c: Remove. * gconf/wordsplit.c, gconf/wordsplit.h: New files. * gconf/Makefile.am (libgconf_a_SOURCES): Remove argcv, add wordsplit * gconf/gconf-lex.l, gconf/gconf-preproc.c: Use wordsplit, instead of argcv_get * src/directive.c, src/method.c: Likewise. * src/wydawca.h: Likewise. * tests/wordsplit.at: New file. * tests/wstest.c, tests/wsbatch.c: New files. * tests/Makefile.am (TESTSUITE_AT): Add wordsplit.at Build wstest and wsbatch. * tests/testsuite.at: Add wordsplit.at.
2009-02-26Switch to non-privileged UID/GID before startup.Sergey Poznyakoff1
* src/userprivs.c: New file. * src/Makefile.am (wydawca_SOURCES): Add userprivs.c * src/config.c (cb_access_method_params): Add missing gl_list_iterator_free. (cb_user, cb_supp_groups): New callbacks. (wydawca_kw): New keywords: user and group. * src/wydawca.c (wydawca_uid, wydawca_gid) (wydawca_supp_groupc, wydawca_supp_groups): New variables. (wydawca_set_uid, wydawca_set_gid, wydawca_set_privs) (wydawca_set_triplet_privs, wydawca_set_root_privs): Remove. (main): --dry-run implies --cron. Switch to non-privileged UID/GID before startup. * src/wydawca.h (wydawca_uid, wydawca_gid) (wydawca_supp_groupc, wydawca_supp_groups): New declarations. * src/mail.c (do_notify): Duplicate admin_address, it gets freed in do_notify. * src/directive.c, src/diskio.c, src/lock.c, src/triplet.c: Update.
2009-02-25Fix privilege selectionSergey Poznyakoff1
2009-02-24Implement lockingSergey Poznyakoff1
* src/lock.c: New file. * gnulib.modules (sysexits, xgethostname): New modules. * src/lock.c: New file. * src/Makefile.am: Add lock.c * src/config.c: Locking keywords. * src/job.c: Requeue jobs if locking fails. * src/wydawca.c (wydawca_uid): Rename to wydawca_set_uid (main): Implement restart. * src/process.c (scan_spool, scan_all_spools): Use locking, if configured. * src/directive.c, src/diskio.c, src/triplet.c: Rename wydawca_uid * src/exec.c, src/getopt.m4, src/net.c, src/pidfile.c: Use standard error codes from sysexits.h * tests/etc/wydawca.rcin: Disable locking.
2009-02-24Initial implementation of daemon mode.Sergey Poznyakoff1
* gconf/gconf-gram.y (string_to_sockaddr_: Take struct gconf_sockaddr as the first argument. * gconf/gconf.h (struct gconf_sockaddr): New data type. * src/job.c, src/net.c, src/pidfile.c: New files. * src/Makefile.am (wydawca_SOURCES): Add job.c, net.c, pidfile.c * src/cmdline.opt: New options: --cron (change semantics), --force, --foreground, --single-process, --spool * src/wydawca.c: New daemon mode. * src/config.c: New statements: spool.alias, daemon, foreground, single-process, wakeup-interval, pidfile, listen * src/directive.c, src/diskio.c, src/gpg.c, src/mail.c, src/null.c, src/process.c, src/triplet.c, src/verify.c, src/vtab.c, src/wydawca.h: use static struct spool wherever feasible. * src/triplet.c: New meta-variable "spool" * tests/etc/wydawca.rcin: Update. * tests/upload-dry.at: Update.

Return to:

Send suggestions and report system problems to the System administrator.