]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
3 years agolib-storage: Override service->name with input->service when available
Marco Bettini [Mon, 6 Jun 2022 10:22:38 +0000 (12:22 +0200)] 
lib-storage: Override service->name with input->service when available

3 years agolib-storage: mail_storage_service_lookup_real() - Reformat very long line
Marco Bettini [Mon, 6 Jun 2022 08:04:50 +0000 (08:04 +0000)] 
lib-storage: mail_storage_service_lookup_real() - Reformat very long line

3 years agolib-storage: mail_storage_service_read_settings() - Fix typo in comment
Marco Bettini [Wed, 1 Jun 2022 10:24:31 +0000 (10:24 +0000)] 
lib-storage: mail_storage_service_read_settings() - Fix typo in comment

3 years agolib-storage: Remove stray whitespaces
Marco Bettini [Tue, 31 May 2022 14:21:43 +0000 (14:21 +0000)] 
lib-storage: Remove stray whitespaces

3 years agolib: test-file-cache - Use RLIMIT_AS only if it's available
Aki Tuomi [Fri, 3 Jun 2022 08:43:08 +0000 (11:43 +0300)] 
lib: test-file-cache - Use RLIMIT_AS only if it's available

3 years agodoveadm-cmd: Use PRId64 instead of %ld
Aki Tuomi [Fri, 3 Jun 2022 08:33:42 +0000 (11:33 +0300)] 
doveadm-cmd: Use PRId64 instead of %ld

int64_t is not guaranteed to be long.

3 years agodoc: Use am__untar to get correct invocation across systems
Aki Tuomi [Fri, 3 Jun 2022 07:10:57 +0000 (10:10 +0300)] 
doc: Use am__untar to get correct invocation across systems

Current one does not work always.

3 years agolib: ioloop-kqueue - Include time-util.h
Aki Tuomi [Fri, 4 Feb 2022 07:33:34 +0000 (09:33 +0200)] 
lib: ioloop-kqueue - Include time-util.h

Needed to compile on MacOS

3 years agoglobal: Use ioloop_time32 more when ioloop_time is used as uint32_t
Martti Rannanjärvi [Fri, 3 Jun 2022 01:05:26 +0000 (04:05 +0300)] 
global: Use ioloop_time32 more when ioloop_time is used as uint32_t

These were missing from 138bee2f638a53415a1729b6a9476eb342b40831.

3 years agoplugins: Use container_of() in doveadm functions instead of hard casts
Marco Bettini [Thu, 19 May 2022 15:24:59 +0000 (15:24 +0000)] 
plugins: Use container_of() in doveadm functions instead of hard casts

3 years agodoveadm: Use container_of() instead of hard casts
Marco Bettini [Thu, 19 May 2022 15:24:37 +0000 (15:24 +0000)] 
doveadm: Use container_of() instead of hard casts

3 years agodoveadm: Remove doveadm_mail_cmd_context::full_args
Marco Bettini [Wed, 18 May 2022 13:05:27 +0000 (13:05 +0000)] 
doveadm: Remove doveadm_mail_cmd_context::full_args

3 years agodoveadm: Refactor doveadm_cmd_ver2_to_mail_cmd_wrapper()
Marco Bettini [Wed, 18 May 2022 11:20:59 +0000 (11:20 +0000)] 
doveadm: Refactor doveadm_cmd_ver2_to_mail_cmd_wrapper()

3 years agodoveadm: Remove doveadm_mail_cmd_vfuncs::parse_arg
Marco Bettini [Tue, 17 May 2022 09:55:34 +0000 (09:55 +0000)] 
doveadm: Remove doveadm_mail_cmd_vfuncs::parse_arg

3 years agodoveadm: Remove doveadm_mail_cmd_context::getopt_args
Marco Bettini [Fri, 6 May 2022 15:38:25 +0000 (15:38 +0000)] 
doveadm: Remove doveadm_mail_cmd_context::getopt_args

3 years agodoveadm: Remove doveadm_mail_cmd_context::args
Marco Bettini [Fri, 6 May 2022 15:24:31 +0000 (15:24 +0000)] 
doveadm: Remove doveadm_mail_cmd_context::args

3 years agodoveadm: Drop parameter args[] from doveadm_mail_cmd_vfuncs::init
Marco Bettini [Fri, 6 May 2022 15:02:25 +0000 (15:02 +0000)] 
doveadm: Drop parameter args[] from doveadm_mail_cmd_vfuncs::init

3 years agodoveadm: Remove ::parse_arg() and ::args from doveadm-mail.c handlers
Marco Bettini [Wed, 4 May 2022 13:28:24 +0000 (13:28 +0000)] 
doveadm: Remove ::parse_arg() and ::args from doveadm-mail.c handlers

3 years agodoveadm: Remove ::parse_arg() and ::args from doveadm-dsync.c handlers
Marco Bettini [Fri, 29 Apr 2022 14:43:06 +0000 (14:43 +0000)] 
doveadm: Remove ::parse_arg() and ::args from doveadm-dsync.c handlers

3 years agodoveadm: Remove ::parse_arg() and ::args from most doveadm-mail-*.c files
Marco Bettini [Tue, 19 Apr 2022 16:21:51 +0000 (16:21 +0000)] 
doveadm: Remove ::parse_arg() and ::args from most doveadm-mail-*.c files

3 years agoplugins: Remove ::parse_arg() and ::args from doveadm handlers
Marco Bettini [Wed, 4 May 2022 10:47:34 +0000 (10:47 +0000)] 
plugins: Remove ::parse_arg() and ::args from doveadm handlers

3 years agodoveadm: doveadm_cmd_ver2_to_mail_cmd_wrapper() - Allow v2 args parsing without parse...
Marco Bettini [Fri, 6 May 2022 15:29:38 +0000 (15:29 +0000)] 
doveadm: doveadm_cmd_ver2_to_mail_cmd_wrapper() - Allow v2 args parsing without parse_arg() hook

3 years agodoveadm: Add doveadm_cmd_param_dump() doveadm_cmd_args_dump() debug functions
Marco Bettini [Thu, 28 Apr 2022 08:37:49 +0000 (08:37 +0000)] 
doveadm: Add doveadm_cmd_param_dump() doveadm_cmd_args_dump() debug functions

3 years agodoveadm: Add flag CMD_PARAM_FLAG_KEY_VALUE (named positional parameters)
Marco Bettini [Fri, 22 Apr 2022 13:16:26 +0000 (13:16 +0000)] 
doveadm: Add flag CMD_PARAM_FLAG_KEY_VALUE (named positional parameters)

3 years agodoveadm: Add doveadm_cmd_param_array_append() and doveadm_cmd_param_array_get()
Marco Bettini [Mon, 23 May 2022 09:09:38 +0000 (09:09 +0000)] 
doveadm: Add doveadm_cmd_param_array_append() and doveadm_cmd_param_array_get()

3 years agodoveadm: Add doveadm_cmd_param_uint64/uint32/int32()
Marco Bettini [Fri, 22 Apr 2022 13:03:51 +0000 (13:03 +0000)] 
doveadm: Add doveadm_cmd_param_uint64/uint32/int32()

3 years agodoveadm: Add doveadm_cmd_param_flag()
Marco Bettini [Fri, 22 Apr 2022 10:18:33 +0000 (10:18 +0000)] 
doveadm: Add doveadm_cmd_param_flag()

3 years agodoveadm: doveadm_fill_param() - Report error on invalid parameters
Marco Bettini [Fri, 22 Apr 2022 12:53:04 +0000 (12:53 +0000)] 
doveadm: doveadm_fill_param() - Report error on invalid parameters

3 years agodoveadm: doveadm_cmd_param_*() - Turn type checks into i_assert()s
Marco Bettini [Thu, 28 Apr 2022 15:36:46 +0000 (15:36 +0000)] 
doveadm: doveadm_cmd_param_*() - Turn type checks into i_assert()s

Attempting to get a paramer by name with a type different from the one declared
in the command block is a logic error. The original behaviors turns that in a
"not found", which can be very misleading to diagnose.

3 years agodoveadm: Split doveadm-cmd into doveadm-cmd-parse
Marco Bettini [Fri, 22 Apr 2022 10:09:21 +0000 (10:09 +0000)] 
doveadm: Split doveadm-cmd into doveadm-cmd-parse

3 years agodoveadm: doveadm_cmd_expunge_ver2 - Fix .usage to reflect the actual parsed syntax
Marco Bettini [Mon, 30 May 2022 10:57:15 +0000 (10:57 +0000)] 
doveadm: doveadm_cmd_expunge_ver2 - Fix .usage to reflect the actual parsed syntax

3 years agodoveadm: doveadm_cmd_mailbox_cache_decision - Fix .usage to reflect the actual parsed...
Marco Bettini [Fri, 27 May 2022 14:08:16 +0000 (14:08 +0000)] 
doveadm: doveadm_cmd_mailbox_cache_decision - Fix .usage to reflect the actual parsed syntax

3 years agolib: Add empty_str_array constant
Marco Bettini [Fri, 27 May 2022 13:54:36 +0000 (13:54 +0000)] 
lib: Add empty_str_array constant

3 years agodoveadm: Remove command doveadm batch
Marco Bettini [Thu, 5 May 2022 08:37:25 +0000 (08:37 +0000)] 
doveadm: Remove command doveadm batch

No longer relevant and also in the way for next changes.

3 years agodoveadm: Remove trailing whitespaces
Marco Bettini [Wed, 20 Apr 2022 14:25:06 +0000 (14:25 +0000)] 
doveadm: Remove trailing whitespaces

3 years agodoveadm: Assert-crash if empty referral is attempted to be sent
Timo Sirainen [Wed, 1 Jun 2022 08:06:13 +0000 (11:06 +0300)] 
doveadm: Assert-crash if empty referral is attempted to be sent

This shouldn't happen anymore after allocating referral from the context
pool.

3 years agodoveadm: Allocate doveadm_cmd_context.referral from the context's pool
Timo Sirainen [Wed, 1 Jun 2022 08:05:27 +0000 (11:05 +0300)] 
doveadm: Allocate doveadm_cmd_context.referral from the context's pool

It's not safe to allocate from data stack.

3 years agodoveadm: Add doveadm_cmd_context.pool
Timo Sirainen [Wed, 1 Jun 2022 08:04:09 +0000 (11:04 +0300)] 
doveadm: Add doveadm_cmd_context.pool

3 years agodoveadm: Split off client_handle_command_ctx()
Timo Sirainen [Wed, 1 Jun 2022 08:03:06 +0000 (11:03 +0300)] 
doveadm: Split off client_handle_command_ctx()

3 years agoacl: acl_backend_vfile_read() - Drop unused param is_dir_r
Marco Bettini [Tue, 31 May 2022 09:52:11 +0000 (09:52 +0000)] 
acl: acl_backend_vfile_read() - Drop unused param is_dir_r

3 years agoacl: acl_backend_vfile_read_with_retry() - Drop logic for .DEFAULT
Marco Bettini [Mon, 30 May 2022 14:48:50 +0000 (14:48 +0000)] 
acl: acl_backend_vfile_read_with_retry() - Drop logic for .DEFAULT

3 years agoacl: acl_backend_vfile_refresh() - Drop logic for .DEFAULT
Marco Bettini [Mon, 30 May 2022 14:48:27 +0000 (14:48 +0000)] 
acl: acl_backend_vfile_refresh() - Drop logic for .DEFAULT

3 years agoacl: acl_backend_vfile_read_with_retry() - Drop parameter global always FALSE
Marco Bettini [Mon, 30 May 2022 14:47:06 +0000 (14:47 +0000)] 
acl: acl_backend_vfile_read_with_retry() - Drop parameter global always FALSE

3 years agoacl: acl_backend_vfile_refresh() - Remove stray spaces
Marco Bettini [Mon, 30 May 2022 14:53:16 +0000 (14:53 +0000)] 
acl: acl_backend_vfile_refresh() - Remove stray spaces

3 years agolib-compression: istream-decompress - Copy parent stream name
Timo Sirainen [Tue, 24 May 2022 12:52:26 +0000 (15:52 +0300)] 
lib-compression: istream-decompress - Copy parent stream name

This is needed, because istream-decompress doesn't actually use the parent
stream as the istream parent.

3 years agofts-flatcurve: Enforce 1st character to be non-uppercase in terms added to Xapian
Marco Bettini [Fri, 20 May 2022 10:30:35 +0000 (10:30 +0000)] 
fts-flatcurve: Enforce 1st character to be non-uppercase in terms added to Xapian

backported from github xapian issue #27
A Xapian term that begins with a capital letter, like "Jim", is actually
treated by Xapian as the term "im" with the "J" prefix.
Since Xapian interally stores data ignore case, we simply enforce the 1st
letter to non-uppercase to inhibit the prefix processing.

3 years agoutil: Remove maildirlock
Aki Tuomi [Thu, 24 Feb 2022 08:58:08 +0000 (10:58 +0200)] 
util: Remove maildirlock

3 years agostats: stats-service-openmetrics - Always clear the stack before next metric body
Aki Tuomi [Thu, 19 May 2022 09:39:55 +0000 (12:39 +0300)] 
stats: stats-service-openmetrics - Always clear the stack before next metric body

If the attempt of generating output for the previous metric doesn’t completely
consume the stack, the next metric will start with a non-empty stack, which breaks
the metrics output.

3 years agodoveadm: Add dsync_features=no-header-hashes
Timo Sirainen [Thu, 19 May 2022 09:24:23 +0000 (11:24 +0200)] 
doveadm: Add dsync_features=no-header-hashes

When this setting is enabled and one dsync side doesn't support mail GUIDs,
there is no fallback to using header hashes. Instead, dsync assumes that
all mails with identical IMAP UIDs contains the same mail contents. This
can significantly improve dsync performance with some IMAP servers that
don't support caching Date/Message-ID headers.

3 years agodoc: Don't trigger documentation rebuild in make dist tarball
Martti Rannanjärvi [Thu, 19 May 2022 09:50:22 +0000 (12:50 +0300)] 
doc: Don't trigger documentation rebuild in make dist tarball

3 years agoutil: dovecot-sysreport - Add timestamps before/after "ps" output
Timo Sirainen [Mon, 16 May 2022 09:04:10 +0000 (11:04 +0200)] 
util: dovecot-sysreport - Add timestamps before/after "ps" output

Sometimes running "ps" can take a while, so make it clear in the output if
this has happened.

3 years agoutil: dovecot-sysreport - Wait 3 seconds between "ps" outputs
Timo Sirainen [Mon, 16 May 2022 08:52:54 +0000 (10:52 +0200)] 
util: dovecot-sysreport - Wait 3 seconds between "ps" outputs

This allows showing more clearly in ps_output file whether a process is
using 100% CPU.

3 years agoconfigure.ac: Use correct path in flex and bison checks
Martti Rannanjärvi [Thu, 19 May 2022 05:32:47 +0000 (08:32 +0300)] 
configure.ac: Use correct path in flex and bison checks

3 years agoauth: Fix assert-crash in iterating multiple userdbs
Timo Sirainen [Wed, 18 May 2022 08:31:44 +0000 (11:31 +0300)] 
auth: Fix assert-crash in iterating multiple userdbs

Broken by 501e17ba6b448ba3c88338596e0e8f99f0693f79

Fixes:
Panic: file userdb-blocking.c: line 125 (userdb_blocking_iter_next): assertion failed: (ctx->conn != NULL)

3 years agodoc: Remove build artifacts when bundling the distribution package
Karl Fleischmann [Wed, 18 May 2022 08:27:23 +0000 (10:27 +0200)] 
doc: Remove build artifacts when bundling the distribution package

3 years agodoc: Fix typo for default target
Karl Fleischmann [Tue, 17 May 2022 14:53:37 +0000 (16:53 +0200)] 
doc: Fix typo for default target

Rename the intended default target to the proper name to ensure the html
documentation is built in the default make step. Previously it ran only
when running the install target which yielded files owned by the root
user (if ran with sudo), which in turn couldn't be removed by non-root
users.

3 years agosubmission: Don't log write() errors that fail due to ECONNRESET
Timo Sirainen [Tue, 17 May 2022 07:05:20 +0000 (09:05 +0200)] 
submission: Don't log write() errors that fail due to ECONNRESET

These happen only if client initialization fails.

3 years agoimap: Don't log write() errors that fail due to ECONNRESET
Timo Sirainen [Tue, 17 May 2022 07:03:47 +0000 (09:03 +0200)] 
imap: Don't log write() errors that fail due to ECONNRESET

These happen only before the client is fully initialized.

3 years agolmtp: Allow reauth to return referral
Timo Sirainen [Thu, 5 May 2022 17:37:18 +0000 (20:37 +0300)] 
lmtp: Allow reauth to return referral

Previously reauth was required to do proxying on success. Now it can also
return "nologin" and "host" to do a referral instead.

3 years agolmtp: Add auth_ prefix to lmtp_proxy_recipient.forward_fields
Timo Sirainen [Fri, 6 May 2022 13:09:17 +0000 (16:09 +0300)] 
lmtp: Add auth_ prefix to lmtp_proxy_recipient.forward_fields

This makes it easier to differentiate from lmtp_recipient.forward_fields

3 years agodoveadm: Split incoming and outgoing forward_fields into separate arrays
Timo Sirainen [Fri, 6 May 2022 10:47:41 +0000 (13:47 +0300)] 
doveadm: Split incoming and outgoing forward_fields into separate arrays

The outgoing forward_fields should be sent to outgoing proxy connections,
but not used for reauth lookups.

3 years agodoveadm: Allow reauth to return referral
Timo Sirainen [Thu, 5 May 2022 17:36:08 +0000 (20:36 +0300)] 
doveadm: Allow reauth to return referral

Previously reauth was required to do proxying on success. Now it can also
return "nologin" and "host" to do a referral instead.

3 years agodoveadm: Log an error if referral is used with non-tcp client
Timo Sirainen [Thu, 5 May 2022 17:34:48 +0000 (20:34 +0300)] 
doveadm: Log an error if referral is used with non-tcp client

3 years agolib-auth: auth_proxy_parse_redirect() - Return failure if host is empty
Timo Sirainen [Thu, 5 May 2022 17:30:28 +0000 (20:30 +0300)] 
lib-auth: auth_proxy_parse_redirect() - Return failure if host is empty

3 years agolib-doveadm: Fix hang if read() fails from cmd_input
Timo Sirainen [Thu, 5 May 2022 17:27:33 +0000 (20:27 +0300)] 
lib-doveadm: Fix hang if read() fails from cmd_input

3 years agolib-doveadm: Log cmd_input stream name if read() from it fails
Timo Sirainen [Thu, 5 May 2022 17:27:13 +0000 (20:27 +0300)] 
lib-doveadm: Log cmd_input stream name if read() from it fails

3 years agolib-doveadm: doveadm_client_cmd() - Don't close cmd_input after reading it
Timo Sirainen [Thu, 5 May 2022 17:17:52 +0000 (20:17 +0300)] 
lib-doveadm: doveadm_client_cmd() - Don't close cmd_input after reading it

The caller may want to use cmd_input for other purposes as well.

3 years agolib-doveadm, doveadm: Add and use enum doveadm_protocol_cmd_flag
Timo Sirainen [Thu, 5 May 2022 15:27:45 +0000 (18:27 +0300)] 
lib-doveadm, doveadm: Add and use enum doveadm_protocol_cmd_flag

3 years agodoveadm: Fail cleanly if referral host is empty
Timo Sirainen [Thu, 5 May 2022 12:43:48 +0000 (15:43 +0300)] 
doveadm: Fail cleanly if referral host is empty

3 years agodoveadm: Allow proxy redirects with hostnames when doing reauth
Timo Sirainen [Mon, 2 May 2022 15:12:14 +0000 (18:12 +0300)] 
doveadm: Allow proxy redirects with hostnames when doing reauth

3 years agologin-common: Allow reauth to return referral
Timo Sirainen [Thu, 5 May 2022 11:13:25 +0000 (14:13 +0300)] 
login-common: Allow reauth to return referral

Previously reauth was required to do proxying on success. Now it can also
return "nologin" and "host" to do a referral instead.

3 years agologin-common: Allow proxy redirects with hostnames when doing reauth
Timo Sirainen [Mon, 2 May 2022 14:55:56 +0000 (17:55 +0300)] 
login-common: Allow proxy redirects with hostnames when doing reauth

3 years agologin-common: Add debug logging when doing reauth
Timo Sirainen [Mon, 2 May 2022 09:56:06 +0000 (12:56 +0300)] 
login-common: Add debug logging when doing reauth

3 years agologin-common: Send forward_* fields to reauth requests
Timo Sirainen [Mon, 2 May 2022 09:55:38 +0000 (12:55 +0300)] 
login-common: Send forward_* fields to reauth requests

3 years agologin-common: Don't require "pass" field for reauth proxy requests
Timo Sirainen [Mon, 2 May 2022 09:54:28 +0000 (12:54 +0300)] 
login-common: Don't require "pass" field for reauth proxy requests

The pass is already known, and even if it was returned the current code
wouldn't use it.

3 years agom4: Fix flex/bison check for out-of-tree builds
Karl Fleischmann [Mon, 9 May 2022 12:59:21 +0000 (14:59 +0200)] 
m4: Fix flex/bison check for out-of-tree builds

3 years agoglobal: Remove wiki from packaging
Karl Fleischmann [Thu, 14 Apr 2022 12:21:01 +0000 (14:21 +0200)] 
global: Remove wiki from packaging

3 years agodoc/example-config: Replace wiki references with web documentation
Karl Fleischmann [Thu, 14 Apr 2022 12:19:39 +0000 (14:19 +0200)] 
doc/example-config: Replace wiki references with web documentation

3 years agom4: Use documentation project in build pipeline
Karl Fleischmann [Wed, 13 Apr 2022 10:24:55 +0000 (12:24 +0200)] 
m4: Use documentation project in build pipeline

To replace the wiki as the main documentation in the distribution
package the documentation project needs to be pulled into this project
in a build step. This commit checks the environment (e.g. python/venv)
and downloads/builds the documentation for packaging.

3 years agom4: Rename BUILD_DOCS to INSTALL_DOCS
Karl Fleischmann [Mon, 9 May 2022 12:00:35 +0000 (14:00 +0200)] 
m4: Rename BUILD_DOCS to INSTALL_DOCS

This communicates more clearly that the docs are packaged and installed
and not merely built.

3 years agogeneral: Replace online wiki references
Karl Fleischmann [Mon, 11 Apr 2022 14:16:54 +0000 (16:16 +0200)] 
general: Replace online wiki references

For all wiki references that have a currently available documentation
page, replace the link to them appropriately.

3 years agolib-master: master-service-haproxy - Correctly align memory
Aki Tuomi [Thu, 12 May 2022 09:04:03 +0000 (12:04 +0300)] 
lib-master: master-service-haproxy - Correctly align memory

Previous version caused type punning warnings.

3 years agolib-master: master-service-haproxy - Remove unnecessary initialization
Aki Tuomi [Thu, 12 May 2022 09:20:29 +0000 (12:20 +0300)] 
lib-master: master-service-haproxy - Remove unnecessary initialization

3 years agolib-master: Use pointer for haproxy data
Aki Tuomi [Mon, 2 May 2022 12:56:00 +0000 (15:56 +0300)] 
lib-master: Use pointer for haproxy data

Data does not need to be copied.

Fixes static analyser complaint about writing to const fields.

3 years agodoveadm-mail-mailbox-cache: Replace indentation spaces with tab
Karl Fleischmann [Tue, 3 May 2022 14:23:51 +0000 (16:23 +0200)] 
doveadm-mail-mailbox-cache: Replace indentation spaces with tab

3 years agodoveadm: Distinguish error status of doveadm_mail_iter_init()
Karl Fleischmann [Mon, 2 May 2022 13:17:41 +0000 (15:17 +0200)] 
doveadm: Distinguish error status of doveadm_mail_iter_init()

Make doveadm_mail_iter_init() return different status codes depending on
whether the mailbox exists or not to fix a crash when calling `doveadm
mailbox cache remove` with an invalid/non-existing mailbox.

3 years agorun-test-valgrind.supp: Suppress iconv open failure with EUC-JP.so
Aki Tuomi [Tue, 3 May 2022 19:41:58 +0000 (22:41 +0300)] 
run-test-valgrind.supp: Suppress iconv open failure with EUC-JP.so

3 years agolib-dict-backend: Fix crash when accessing shared dict keys with NULL username
Aki Tuomi [Mon, 2 May 2022 18:52:14 +0000 (21:52 +0300)] 
lib-dict-backend: Fix crash when accessing shared dict keys with NULL username

3 years agodirector: Use time_to_uint32() to cast time_t to unsigned int where needed
Martti Rannanjärvi [Wed, 4 May 2022 15:20:15 +0000 (18:20 +0300)] 
director: Use time_to_uint32() to cast time_t to unsigned int where needed

3 years agodirector: Use ioloop_time32 when ioloop_time is used as unsigned int
Martti Rannanjärvi [Wed, 4 May 2022 15:19:31 +0000 (18:19 +0300)] 
director: Use ioloop_time32 when ioloop_time is used as unsigned int

3 years agoglobal: Use time_to_uint32_trunc() to cast time_t to uint32_t where needed
Martti Rannanjärvi [Tue, 3 May 2022 11:23:39 +0000 (14:23 +0300)] 
global: Use time_to_uint32_trunc() to cast time_t to uint32_t where needed

This addresses Coverity complaints.

3 years agoglobal: Use time_to_uint32() to cast time_t to uint32_t where needed
Martti Rannanjärvi [Tue, 3 May 2022 10:13:01 +0000 (13:13 +0300)] 
global: Use time_to_uint32() to cast time_t to uint32_t where needed

This addresses Coverity complaints.

3 years agoglobal: Use ioloop_time32 when ioloop_time is used as uint32_t
Martti Rannanjärvi [Tue, 3 May 2022 09:04:48 +0000 (12:04 +0300)] 
global: Use ioloop_time32 when ioloop_time is used as uint32_t

3 years agolib: Add time_to_uint32() and time_to_uint32_trunc()
Martti Rannanjärvi [Mon, 2 May 2022 11:23:05 +0000 (14:23 +0300)] 
lib: Add time_to_uint32() and time_to_uint32_trunc()

time_to_uint32() asserts the time_t value fits in uint32_t and
time_to_uint32_trunc() truncates the value.

3 years agofts-flatcurve: Fix unused parameter warning
Aki Tuomi [Tue, 3 May 2022 19:50:24 +0000 (22:50 +0300)] 
fts-flatcurve: Fix unused parameter warning

3 years agomaster: Assume service is successful if its process has existed for 10 seconds
Timo Sirainen [Thu, 14 Apr 2022 16:12:04 +0000 (18:12 +0200)] 
master: Assume service is successful if its process has existed for 10 seconds

master code has a special check to start throttling services that are
rapidly dying and have never had any successful exits. However, this exit
check is a bit bad for services whose processes are supposed to never
exit. So if a service has a process that exists for at least 10 seconds
and has initial status notification sent, handle it the same as if the
service had already once exited successfully.

3 years agolib-master: Wait for initial status notification write to finish before continuing
Timo Sirainen [Thu, 14 Apr 2022 15:19:19 +0000 (17:19 +0200)] 
lib-master: Wait for initial status notification write to finish before continuing

Otherwise if the process dies early, master might think the service is
broken and start throttling it. This would only happen if the initial
write() failed with EAGAIN, meaning master was very busy and didn't have
time to read all the notification pipes.

3 years agolib-master: If status write() fails permanently, remove IO_WRITE handler
Timo Sirainen [Thu, 14 Apr 2022 15:17:30 +0000 (17:17 +0200)] 
lib-master: If status write() fails permanently, remove IO_WRITE handler

This prevents rapidly looping to the function in case the IO is set.

3 years agomaster: Add comment about services flooding status notifications
Timo Sirainen [Thu, 14 Apr 2022 15:52:53 +0000 (17:52 +0200)] 
master: Add comment about services flooding status notifications

3 years agolib-storage: mbox_read_from_line() - Check size given to mbox_from_parse() is positive
Martti Rannanjärvi [Mon, 2 May 2022 17:18:03 +0000 (20:18 +0300)] 
lib-storage: mbox_read_from_line() - Check size given to mbox_from_parse() is positive

This addresses a Coverity complaint.