diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-04-23 16:08:02 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-04-23 16:08:02 +0300 |
commit | 5fc301baf79e9cc19b1bc8e7a5940e060611e349 (patch) | |
tree | 2abb94f51bfdbe702ab0b67aa3d8ffc5ccd7e203 /src | |
parent | f8f8ad5f57d54bbec22e7850a15707421dadb13b (diff) | |
download | wydawca-5fc301baf79e9cc19b1bc8e7a5940e060611e349.tar.gz wydawca-5fc301baf79e9cc19b1bc8e7a5940e060611e349.tar.bz2 |
Bugfixes.
* configure.ac: Use AC_SYS_LARGEFILE.
* grecs: Upgrade.
* src/wydawca.c (main): Check GPGME version.
Diffstat (limited to 'src')
-rw-r--r-- | src/wydawca.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/wydawca.c b/src/wydawca.c index a71a04e..12f04de 100644 --- a/src/wydawca.c +++ b/src/wydawca.c @@ -326,30 +326,40 @@ wydawca_daemon () #include "cmdline.h" int main (int argc, char **argv) { struct grecs_node *tree; + const char *p; program_name = argv[0]; mu_register_all_mailer_formats (); mu_stdstream_setup (MU_STDSTREAM_RESET_NONE); config_init (); x_argv = argv; parse_options (argc, argv); argv += optind; argc -= optind; + p = gpgme_check_version ("1.2.0"); + if (!p) + { + logmsg (LOG_CRIT, _("GPGMe version check failed")); + exit (EX_UNAVAILABLE); + } + else if (debug_level > 3) + logmsg (LOG_DEBUG, _("using GPGME version %s"), p); + if (argc) collect_uids (argc, argv); if (preprocess_only) exit (grecs_preproc_run (conffile, grecs_preprocessor) ? EX_CONFIG : 0); - + tree = grecs_parse (conffile); if (!tree) exit (EX_CONFIG); config_finish (tree); grecs_tree_free (tree); @@ -367,18 +377,21 @@ main (int argc, char **argv) single_process = single_process_option; if (log_to_stderr == -1) log_to_stderr = (!daemon_mode || foreground) && isatty (0); grecs_log_to_stderr = log_to_stderr; + mu_log_tag = syslog_tag; + mu_log_facility = log_facility; if (!log_to_stderr) { openlog (syslog_tag, LOG_PID, log_facility); log_printer = syslog_printer; - mu_stdstream_strerr_setup (MU_STRERR_SYSLOG); } + mu_stdstream_strerr_setup (log_to_stderr ? + MU_STRERR_STDERR : MU_STRERR_SYSLOG); if (getgid () == 0) { if (wydawca_uid == 0) { if (!force_startup) |