]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
9 years agolib-index: Improve error messages when transaction log is unexpectedly lost
Timo Sirainen [Fri, 11 Nov 2016 15:00:39 +0000 (17:00 +0200)] 
lib-index: Improve error messages when transaction log is unexpectedly lost

9 years agodict-client: Forward dict_iterate_set_limit() to dict server
Timo Sirainen [Thu, 10 Nov 2016 21:00:59 +0000 (23:00 +0200)] 
dict-client: Forward dict_iterate_set_limit() to dict server

9 years agodict-client: Code cleanup - remember all iteration flags
Timo Sirainen [Thu, 10 Nov 2016 21:23:39 +0000 (23:23 +0200)] 
dict-client: Code cleanup - remember all iteration flags

9 years agolib-dict: Fix infinite loop when row limit is reached.
Timo Sirainen [Thu, 10 Nov 2016 20:57:22 +0000 (22:57 +0200)] 
lib-dict: Fix infinite loop when row limit is reached.

If dict_iterate_has_more() keeps returning TRUE, the caller keeps calling
dict_iterate().

9 years agodirector: Don't access freed memory during deinit
Timo Sirainen [Fri, 11 Nov 2016 11:06:41 +0000 (13:06 +0200)] 
director: Don't access freed memory during deinit

9 years agosdbox: Fix crash on mailbox_sync*() when mailbox auto-open fails.
Timo Sirainen [Thu, 10 Nov 2016 16:24:46 +0000 (18:24 +0200)] 
sdbox: Fix crash on mailbox_sync*() when mailbox auto-open fails.

9 years agodirector: Fix crash when receiving USER-MOVE for nonexistent user.
Timo Sirainen [Wed, 9 Nov 2016 13:17:01 +0000 (15:17 +0200)] 
director: Fix crash when receiving USER-MOVE for nonexistent user.

9 years agodirector: remove unused variable from doveadm-connection
Martti Rannanjärvi [Wed, 9 Nov 2016 09:27:20 +0000 (11:27 +0200)] 
director: remove unused variable from doveadm-connection

9 years agolib-http: test-http-client-errors: Add test for server that returns error status...
Stephan Bosch [Tue, 8 Nov 2016 23:48:32 +0000 (00:48 +0100)] 
lib-http: test-http-client-errors: Add test for server that returns error status early while client is still sending blocking payload.

9 years agolib-http: client: Fixed assert failure occurring when server returns error status...
Stephan Bosch [Tue, 8 Nov 2016 23:46:32 +0000 (00:46 +0100)] 
lib-http: client: Fixed assert failure occurring when server returns error status early while client is still sending blocking payload.

9 years agolib-http: Added blocking client support to test-http-client-errors.
Stephan Bosch [Tue, 8 Nov 2016 23:24:54 +0000 (00:24 +0100)] 
lib-http: Added blocking client support to test-http-client-errors.

9 years agoimap: Free box on error
Aki Tuomi [Tue, 8 Nov 2016 18:41:15 +0000 (20:41 +0200)] 
imap: Free box on error

Otherwise the box wil leak as it is not assigned
anywhere and can cause crash on imap exit due
to stats plugin timeout leak.

9 years agodirector: Keep per-tag directory
Aki Tuomi [Thu, 20 Oct 2016 16:06:22 +0000 (19:06 +0300)] 
director: Keep per-tag directory

9 years agodirector: Code cleanup - typedef user_free_hook
Aki Tuomi [Tue, 1 Nov 2016 12:36:19 +0000 (14:36 +0200)] 
director: Code cleanup - typedef user_free_hook

This is done because user_free_hook needs to be
also used in mail_host. If it changes, this
reduces the places that need touching.

9 years agodirector: Code cleanup - Reorder includes
Aki Tuomi [Tue, 1 Nov 2016 12:40:49 +0000 (14:40 +0200)] 
director: Code cleanup - Reorder includes

This is required to enable typedef of
user_free_hook

9 years agodirector: Code cleanup - moved username_hash generation to director.h
Timo Sirainen [Thu, 20 Oct 2016 17:31:33 +0000 (20:31 +0300)] 
director: Code cleanup - moved username_hash generation to director.h

It's not really user_directory specific. This is especially important
in the following patches that add per-tag user_directories. It's also not
always known which tag the username_hash refers to, so there can't be
different tag-specific username_hash generators.

9 years agodirector: Code cleanup - added user director_iterate_users_*() wrappers.
Timo Sirainen [Thu, 20 Oct 2016 16:38:28 +0000 (19:38 +0300)] 
director: Code cleanup - added user director_iterate_users_*() wrappers.

This will shrink the diff for the following changes.

9 years agodirector: Code cleanup - use temporary users variables
Timo Sirainen [Thu, 20 Oct 2016 16:17:11 +0000 (19:17 +0300)] 
director: Code cleanup - use temporary users variables

This will shrink the diff for the following changes.

9 years agodirector: Code cleanup - moved code to notify_update_user()
Timo Sirainen [Thu, 20 Oct 2016 13:14:36 +0000 (16:14 +0300)] 
director: Code cleanup - moved code to notify_update_user()

9 years agodirector: const mail_host in mail_host_get_tag
Aki Tuomi [Thu, 20 Oct 2016 12:13:04 +0000 (15:13 +0300)] 
director: const mail_host in mail_host_get_tag

9 years agolib: Add test vectors for message digests
Aki Tuomi [Sat, 5 Nov 2016 17:06:33 +0000 (19:06 +0200)] 
lib: Add test vectors for message digests

9 years agolib: Add SHA3 hashing methods for 256 and 512 bits
Aki Tuomi [Sat, 5 Nov 2016 09:48:27 +0000 (11:48 +0200)] 
lib: Add SHA3 hashing methods for 256 and 512 bits

9 years agolib: Move sha context and result size to new header
Aki Tuomi [Sat, 5 Nov 2016 09:47:40 +0000 (11:47 +0200)] 
lib: Move sha context and result size to new header

This is to prepare for SHA3 inclusion

9 years agolib-lda: smtp-client: Replaced temp file handling with iostream-temp.
Stephan Bosch [Sat, 5 Nov 2016 20:50:30 +0000 (21:50 +0100)] 
lib-lda: smtp-client: Replaced temp file handling with iostream-temp.

9 years agolib-lda: smtp-client: Use program-client for invoking sendmail binary.
Stephan Bosch [Sat, 5 Nov 2016 19:57:20 +0000 (20:57 +0100)] 
lib-lda: smtp-client: Use program-client for invoking sendmail binary.

9 years agolib-lda: smtp-client: Made boolean fields single-bit.
Stephan Bosch [Sat, 5 Nov 2016 21:34:18 +0000 (22:34 +0100)] 
lib-lda: smtp-client: Made boolean fields single-bit.

9 years agolib-lda: smtp-client: Renamed "smtp_client" parameters to "client" for consistency.
Stephan Bosch [Sat, 5 Nov 2016 21:00:09 +0000 (22:00 +0100)] 
lib-lda: smtp-client: Renamed "smtp_client" parameters to "client" for consistency.

9 years agom4: Fix compiler warnings
Aki Tuomi [Mon, 7 Nov 2016 21:27:01 +0000 (23:27 +0200)] 
m4: Fix compiler warnings

Makes it work with -Wall -W -Werror

9 years agolib-storage: Renamed MAIL_SEARCH_ARG_FLAG_USE_TZ to _FLAG_UTC_TIMES
Timo Sirainen [Fri, 4 Nov 2016 10:36:19 +0000 (12:36 +0200)] 
lib-storage: Renamed MAIL_SEARCH_ARG_FLAG_USE_TZ to _FLAG_UTC_TIMES

9 years agolib-storage: Updated MAIL_SEARCH_ARG_FLAG_USE_TZ comment.
Timo Sirainen [Fri, 4 Nov 2016 10:18:47 +0000 (12:18 +0200)] 
lib-storage: Updated MAIL_SEARCH_ARG_FLAG_USE_TZ comment.

9 years agolib-storage: Fix doveadm search query parsing to use timezones correctly.
Timo Sirainen [Fri, 4 Nov 2016 10:04:11 +0000 (12:04 +0200)] 
lib-storage: Fix doveadm search query parsing to use timezones correctly.

When using a date string, e.g. "senton 25-Mar-2007" it should work the same
way as IMAP does and show all mails whose sent date is on 25th, ignoring
whatever the timezone is in the Date header (or in case of received/saved-date
it would be using the timestamps in server's local timezone, again just like
IMAP).

When search with an exact UNIX timestamp or a time interval (e.g.
"3 days"), it should be using UTC times for doing all comparisons.

9 years agolib-storage: Reverse MAIL_SEARCH_ARG_FLAG_USE_TZ handling again.
Timo Sirainen [Fri, 4 Nov 2016 10:03:47 +0000 (12:03 +0200)] 
lib-storage: Reverse MAIL_SEARCH_ARG_FLAG_USE_TZ handling again.

It wasn't really wrong, it was just confusing. And doveadm's tz-handling
was wrong.

Reverses 059e4ac419224598349704b74cb9f6b49278df46

9 years agolib-http: Fixed potential segfault problem in test-http-client-errors.
Stephan Bosch [Thu, 3 Nov 2016 20:06:27 +0000 (21:06 +0100)] 
lib-http: Fixed potential segfault problem in test-http-client-errors.

Found by Coverity.

9 years agolib: Define ARRAY_TYPE for uint8_t, uint16_t and uint64_t.
Timo Sirainen [Thu, 3 Nov 2016 17:16:49 +0000 (19:16 +0200)] 
lib: Define ARRAY_TYPE for uint8_t, uint16_t and uint64_t.

9 years agodata-stack: T_BEGIN should use file & line number as the t_push marker
Josef 'Jeff' Sipek [Wed, 19 Oct 2016 16:33:02 +0000 (12:33 -0400)] 
data-stack: T_BEGIN should use file & line number as the t_push marker

Using a function name is not unique if there is more than one T_BEGIN in a
function.  Therefore, switch the marker passed into t_push to be the
concatenation of __FILE__ and __LINE__.

9 years agodata-stack: t_push should always keep track of the marker
Josef 'Jeff' Sipek [Wed, 19 Oct 2016 16:24:12 +0000 (12:24 -0400)] 
data-stack: t_push should always keep track of the marker

Instead of only keeping track of it on DEBUG builds, t_push should always
keep the marker around.  This will help diagnosing issues on non-debug
builds.

9 years agouse __func__ instead of __FUNCTION__
Josef 'Jeff' Sipek [Mon, 17 Oct 2016 13:49:36 +0000 (09:49 -0400)] 
use __func__ instead of __FUNCTION__

__FUNCTION__ is a non-standard extension while __func__ is C99.

9 years agoauth: Use buffer_truncate_rshift_bits
Aki Tuomi [Tue, 1 Nov 2016 19:50:29 +0000 (21:50 +0200)] 
auth: Use buffer_truncate_rshift_bits

9 years agolib: Add tests for hashed var-expand
Aki Tuomi [Thu, 27 Oct 2016 13:20:20 +0000 (16:20 +0300)] 
lib: Add tests for hashed var-expand

9 years agolib: Add generic hashing support to var-expand
Aki Tuomi [Thu, 27 Oct 2016 12:37:45 +0000 (15:37 +0300)] 
lib: Add generic hashing support to var-expand

Enables use of

%{H;rounds=<rounds>,truncate=<bits>,salt=<salt>:field}

syntax in any variable expansion. H is any supported
hash algorithm or pkcs5 for PKCS#5 PBKDF2 using SHA256.

9 years agolib: Do not consume {} inside %{}
Aki Tuomi [Thu, 27 Oct 2016 13:19:52 +0000 (16:19 +0300)] 
lib: Do not consume {} inside %{}

9 years agolib: Add unit test for buffer truncate
Aki Tuomi [Tue, 1 Nov 2016 18:14:43 +0000 (20:14 +0200)] 
lib: Add unit test for buffer truncate

9 years agolib: Add buffer truncate
Aki Tuomi [Tue, 1 Nov 2016 18:06:46 +0000 (20:06 +0200)] 
lib: Add buffer truncate

9 years agoauth: Make static analyzer happier.
Timo Sirainen [Wed, 2 Nov 2016 21:00:50 +0000 (23:00 +0200)] 
auth: Make static analyzer happier.

Don't complain about uninitialized static_password being sent to
passdb_handle_credentials(). It could only happen for failures, and
passdb_handle_credentials() wouldn't have used the password then.

9 years agofts: Fix error message when syncing FTS root mailbox fails.
Timo Sirainen [Wed, 2 Nov 2016 19:59:12 +0000 (21:59 +0200)] 
fts: Fix error message when syncing FTS root mailbox fails.

9 years agoauth: Fixes to previous var_expand() change.
Timo Sirainen [Wed, 2 Nov 2016 13:43:37 +0000 (15:43 +0200)] 
auth: Fixes to previous var_expand() change.

9 years agolib: ioloop-notify-kqueue wasn't storing source filename.
Timo Sirainen [Wed, 2 Nov 2016 13:31:14 +0000 (15:31 +0200)] 
lib: ioloop-notify-kqueue wasn't storing source filename.

9 years agolib-storage: Fix previous var_expand() change.
Timo Sirainen [Wed, 2 Nov 2016 13:22:25 +0000 (15:22 +0200)] 
lib-storage: Fix previous var_expand() change.

9 years agolib: API change - var_expand_func_table.func() can now return error.
Timo Sirainen [Mon, 31 Oct 2016 20:05:11 +0000 (22:05 +0200)] 
lib: API change - var_expand_func_table.func() can now return error.

None of the existing functions were changed to return errors (yet).

9 years agolib: API change - var_expand*() now returns error string.
Timo Sirainen [Mon, 31 Oct 2016 19:48:16 +0000 (21:48 +0200)] 
lib: API change - var_expand*() now returns error string.

This allows callers to fail properly if the format string is invalid.

9 years agoauth: Code cleanup - Move passwd-file extra fields import to its own function.
Timo Sirainen [Mon, 31 Oct 2016 18:26:02 +0000 (20:26 +0200)] 
auth: Code cleanup - Move passwd-file extra fields import to its own function.

This will shrink the diff output for the following var_expand() change.

9 years agolib: var_expand() code cleanup - Moved short %v expansion to its own function.
Timo Sirainen [Mon, 31 Oct 2016 17:20:51 +0000 (19:20 +0200)] 
lib: var_expand() code cleanup - Moved short %v expansion to its own function.

9 years agoimap-login: Adjusted IMAP AUTHENTICATE command to return CONTACTADMIN and EXPIRED...
Stephan Bosch [Sat, 1 Oct 2016 18:12:13 +0000 (20:12 +0200)] 
imap-login: Adjusted IMAP AUTHENTICATE command to return CONTACTADMIN and EXPIRED response codes when appropriate.

9 years agoauth,login-common: Added result code for invalid base64-encoded response data.
Stephan Bosch [Tue, 1 Nov 2016 21:45:16 +0000 (22:45 +0100)] 
auth,login-common: Added result code for invalid base64-encoded response data.

9 years agologin-common: Added result codes for mechanism-related failures.
Stephan Bosch [Wed, 2 Nov 2016 00:31:40 +0000 (01:31 +0100)] 
login-common: Added result codes for mechanism-related failures.

9 years agologin-common: Added result code for a nologin code from the auth service.
Stephan Bosch [Tue, 1 Nov 2016 22:12:25 +0000 (23:12 +0100)] 
login-common: Added result code for a nologin code from the auth service.

9 years agologin-common: Added result code for password-expired authentication failure.
Stephan Bosch [Wed, 2 Nov 2016 00:39:49 +0000 (01:39 +0100)] 
login-common: Added result code for password-expired authentication failure.

9 years agoauth: Added a code= field to the auth FAIL response that replaces the "authz", "temp...
Stephan Bosch [Tue, 1 Nov 2016 20:32:42 +0000 (21:32 +0100)] 
auth: Added a code= field to the auth FAIL response that replaces the "authz", "temp", "pass_expired", and "user_disabled" fields.

9 years agolib-http: Added DNS-related tests to test-http-client-errors.
Stephan Bosch [Tue, 25 Oct 2016 07:56:34 +0000 (09:56 +0200)] 
lib-http: Added DNS-related tests to test-http-client-errors.

9 years agolib-http: client: Destroy host and associated queue objects after no more requests...
Stephan Bosch [Fri, 16 Sep 2016 18:29:00 +0000 (20:29 +0200)] 
lib-http: client: Destroy host and associated queue objects after no more requests remain and an idle timeout expires.

9 years agolib-http: client: Implemented host name lookup TTL.
Stephan Bosch [Fri, 16 Sep 2016 18:22:17 +0000 (20:22 +0200)] 
lib-http: client: Implemented host name lookup TTL.

Host name lookups will now be performed again when the results have expired.
Without access to TTL information from DNS lookups, all lookups will use the same default TTL for now.

9 years agolib-http: client: Added http_client_queue_requests_active().
Stephan Bosch [Thu, 15 Sep 2016 20:49:54 +0000 (22:49 +0200)] 
lib-http: client: Added http_client_queue_requests_active().

It counts how many active requests a queue has.

9 years agolib-http: client: Create queue->pending_peers array from the beginning.
Stephan Bosch [Thu, 15 Sep 2016 23:58:27 +0000 (01:58 +0200)] 
lib-http: client: Create queue->pending_peers array from the beginning.

This simplifies the code, since the pending peers array is always used.

9 years agolib-http: client: Link peers to queue earlier: during connection attempts.
Stephan Bosch [Thu, 15 Sep 2016 23:35:09 +0000 (01:35 +0200)] 
lib-http: client: Link peers to queue earlier: during connection attempts.

This makes sure that queues keep track of which peers are doing stuff on its behalf.
This is important to be able to manage the active peers when a new host name lookup was performed; if a peer is no longer listed in the returned IPs it should be dropped.

9 years agolib-http: client: Created http_client_peer_drop() function that closes a peer object...
Stephan Bosch [Thu, 15 Sep 2016 00:14:46 +0000 (02:14 +0200)] 
lib-http: client: Created http_client_peer_drop() function that closes a peer object gracefully.

It checks whether any connections are still present.
It checks whether a backoff timer is still active.
This change and subsequent changes prepare for being able to destroy a queue when it becomes unused.
All peers linked to such a queue are unlinked and dropped when inactive and unlinked.

9 years agolib-http: client: Unlink all queues from peer when it is disconnected.
Stephan Bosch [Thu, 15 Sep 2016 00:09:47 +0000 (02:09 +0200)] 
lib-http: client: Unlink all queues from peer when it is disconnected.

Before, queues were only destroyed when the whole client was destroyed.
This change and subsequent changes prepare for being able to destroy a queue when it becomes unused.

9 years agolib-http: client: Improved logging of connection loss handling in peer.
Stephan Bosch [Wed, 14 Sep 2016 23:59:23 +0000 (01:59 +0200)] 
lib-http: client: Improved logging of connection loss handling in peer.

9 years agolib-http: client: If a peer object is no longer linked to a queue, don't close it...
Stephan Bosch [Wed, 14 Sep 2016 19:37:38 +0000 (21:37 +0200)] 
lib-http: client: If a peer object is no longer linked to a queue, don't close it until all connections are inactive.

The peer object is canceled, rather than closed. Which means that any newly started and idle connections are closed immediately.
Requests may be pending though.
This is only relevant when hosts/queues are removed at some point.
This is a preparational change for having a maximum lifetime on hosts/queues, in which case this becomes a possibility.

9 years agolib-http: client: Added debug messages that indicate when a queue is linked/unlinked...
Stephan Bosch [Tue, 13 Sep 2016 23:37:05 +0000 (01:37 +0200)] 
lib-http: client: Added debug messages that indicate when a queue is linked/unlinked to a peer.

9 years agolib-http: client: Added function that counts how many connections are active within...
Stephan Bosch [Tue, 13 Sep 2016 23:30:16 +0000 (01:30 +0200)] 
lib-http: client: Added function that counts how many connections are active within a peer.

9 years agolib-http: client: Added function that checks whether a connection is currently active.
Stephan Bosch [Tue, 13 Sep 2016 23:26:10 +0000 (01:26 +0200)] 
lib-http: client: Added function that checks whether a connection is currently active.

9 years agolib-http: client: Created http_client_connection_failure() handler.
Stephan Bosch [Sun, 11 Sep 2016 17:34:34 +0000 (19:34 +0200)] 
lib-http: client: Created http_client_connection_failure() handler.

9 years agolib-http: client: Set conn->connect_request to NULL immediately in http_client_connec...
Stephan Bosch [Sun, 11 Sep 2016 17:44:32 +0000 (19:44 +0200)] 
lib-http: client: Set conn->connect_request to NULL immediately in http_client_connection_tunnel_response().

Prevents referring to this completed request in other parts of the code.

9 years agolib-http: client: Improved handling of hosts with explicit IP address.
Stephan Bosch [Sun, 11 Sep 2016 15:46:10 +0000 (17:46 +0200)] 
lib-http: client: Improved handling of hosts with explicit IP address.

9 years agolib-http: Made test-http-client-errors more reliable.
Stephan Bosch [Sun, 11 Sep 2016 12:51:28 +0000 (14:51 +0200)] 
lib-http: Made test-http-client-errors more reliable.

9 years agolib-index: Don't waste 3 bytes of space in struct mail_index_record.
Timo Sirainen [Tue, 1 Nov 2016 10:35:08 +0000 (12:35 +0200)] 
lib-index: Don't waste 3 bytes of space in struct mail_index_record.

It was always supposed to be used mainly for keywords, but it got broken
many years ago and nobody noticed.

9 years agolib-storage: Don't enable modseqs on STATUS_HIGHESTMODSEQ.
Timo Sirainen [Tue, 1 Nov 2016 10:43:03 +0000 (12:43 +0200)] 
lib-storage: Don't enable modseqs on STATUS_HIGHESTMODSEQ.

This is requested always by IMAP's SELECT command even when the IMAP client
hasn't requested it. We don't want to unnecessarily enable modseqs that use up
memory and disk space when they're not really needed. Other callers may also be
interested in asking for HIGHESTMODSEQ (which is nowadays actually always
available) without enabling full modseq tracking.

9 years agolib-storage: Reverse MAIL_SEARCH_ARG_FLAG_USE_TZ handling.
Timo Sirainen [Tue, 1 Nov 2016 13:51:02 +0000 (15:51 +0200)] 
lib-storage: Reverse MAIL_SEARCH_ARG_FLAG_USE_TZ handling.

It was being used the wrong way. SEARCH SENTON/BEFORE/AFTER should have
checked the times within the mail's timezone, not UTC.

9 years agodoveadm director: Fix memory leaks if hostname lookup fails.
Timo Sirainen [Mon, 31 Oct 2016 19:39:44 +0000 (21:39 +0200)] 
doveadm director: Fix memory leaks if hostname lookup fails.

9 years agolib: Fix str_truncate() when string size is already smaller.
Timo Sirainen [Tue, 1 Nov 2016 15:09:27 +0000 (17:09 +0200)] 
lib: Fix str_truncate() when string size is already smaller.

Previous behavior either added extra NULs to the string or assert-crashed.

9 years agoimap/pop3 proxy: If passdb returns proxy_not_trusted, don't send ID/XCLIENT
Timo Sirainen [Fri, 16 Sep 2016 06:53:06 +0000 (09:53 +0300)] 
imap/pop3 proxy: If passdb returns proxy_not_trusted, don't send ID/XCLIENT

This allows using Dovecot proxying feature towards less trusted servers.

9 years agoauth: Code cleanup - Return void in passdb.set_credentials()
Timo Sirainen [Mon, 31 Oct 2016 18:42:03 +0000 (20:42 +0200)] 
auth: Code cleanup - Return void in passdb.set_credentials()

It's an asynchronous function, so the result will be in the callback
parameters.

9 years agoauth: If passwd-file can't be read, return tempfail (not user unknown).
Timo Sirainen [Mon, 31 Oct 2016 18:19:07 +0000 (20:19 +0200)] 
auth: If passwd-file can't be read, return tempfail (not user unknown).

9 years agoauth: If uidgid_file doesn't exist, fail the userdb lookup.
Timo Sirainen [Mon, 31 Oct 2016 18:06:35 +0000 (20:06 +0200)] 
auth: If uidgid_file doesn't exist, fail the userdb lookup.

9 years agomdbox: Fix assert-crash caused by race condition with multiple doveadm purges.
Timo Sirainen [Fri, 28 Oct 2016 10:26:42 +0000 (13:26 +0300)] 
mdbox: Fix assert-crash caused by race condition with multiple doveadm purges.

This fixes a problem where an email that was just written to a new m.* file gets
expunged and purged by another process.

Fixes:
Panic: file mdbox-map.c: line 1359: unreached

9 years agofs-randomfail: "write" probability was reversed.
Timo Sirainen [Mon, 31 Oct 2016 17:12:14 +0000 (19:12 +0200)] 
fs-randomfail: "write" probability was reversed.

0 meant 100% while 100 meant 0%

9 years agolib-test: Do not init/deinit library twice
Aki Tuomi [Mon, 31 Oct 2016 13:37:00 +0000 (15:37 +0200)] 
lib-test: Do not init/deinit library twice

If lib is initialized, do not initialize
or deinitialize library. This is done to
allow using master_service in unit tests
which also wants to perform lib init
and deinit itself.

9 years agolib: Add function to see if lib is initialized
Aki Tuomi [Mon, 31 Oct 2016 13:36:39 +0000 (15:36 +0200)] 
lib: Add function to see if lib is initialized

This is needed by test-lib to prevent double init/deinit.

9 years agoconfigure: Fix link ordering
Timo Sirainen [Fri, 28 Oct 2016 18:34:41 +0000 (21:34 +0300)] 
configure: Fix link ordering

libprogram_client.la needs to be before libdns.la

9 years agodsync: Fix potential assert on mailbox deinit.
Timo Sirainen [Fri, 28 Oct 2016 16:38:43 +0000 (19:38 +0300)] 
dsync: Fix potential assert on mailbox deinit.

Should have happened only in somewhat rare error conditions that require
resyncing.

Fixes:
Panic: file dsync-brain-mailbox.c: line 358 (dsync_brain_sync_mailbox_deinit): assertion failed: (brain->failed || brain->sync_type == DSYNC_BRAIN_SYNC_TYPE_CHANGED)

9 years agoconfigure: Improve check for OpenSSL without EC support
Paul Howarth [Fri, 28 Oct 2016 13:36:41 +0000 (14:36 +0100)] 
configure: Improve check for OpenSSL without EC support

The original test was for EC_KEY_new but some systems had that and not
EVP_PKEY_CTX_new_id, so the test was switched to that function.
However, Fedora releases 12 through 17 have EVP_PKEY_CTX_new_id but
not EC_KEY_new. So we need to test for both functions before enabling
the dcrypt build.

9 years agolib-program-client: Fix building with compilers that have no typeof()
Timo Sirainen [Fri, 28 Oct 2016 13:59:43 +0000 (16:59 +0300)] 
lib-program-client: Fix building with compilers that have no typeof()

9 years agolib: Removed t_strsplit_tab()
Timo Sirainen [Fri, 28 Oct 2016 10:02:55 +0000 (13:02 +0300)] 
lib: Removed t_strsplit_tab()

It's too easy to use it accidentally instead of using
t_strsplit_tabescaped(). It's also rarely what is actually wanted.

9 years agoauth-worker: Fix potential crash when importing passdb/userdb fields without value.
Timo Sirainen [Fri, 28 Oct 2016 09:12:28 +0000 (12:12 +0300)] 
auth-worker: Fix potential crash when importing passdb/userdb fields without value.

These were being converted to NULL values in auth-worker, while elsewhere they were
converted to "". Changed to "" here as well and added asserts to make sure they
won't happen again.

Most of the NULL values would have been fine, but overriding any IP/port
fields would have caused a crash when trying to parse the value.

9 years agoauth: Fix crash when exporting passdb fields to auth-worker that have NULL values
Timo Sirainen [Fri, 28 Oct 2016 08:54:27 +0000 (11:54 +0300)] 
auth: Fix crash when exporting passdb fields to auth-worker that have NULL values

9 years agolib-compression: Fixed fd leak in unit test
Timo Sirainen [Thu, 27 Oct 2016 10:20:03 +0000 (13:20 +0300)] 
lib-compression: Fixed fd leak in unit test

9 years agolib-auth: Minor debug logging improvement.
Timo Sirainen [Thu, 27 Oct 2016 08:19:50 +0000 (11:19 +0300)] 
lib-auth: Minor debug logging improvement.

Include "PASS" or "USER" in the prefix to make it clear what the reply is
for.

9 years agolib-storage: rename get_real_mail to get_backend_mail
Martti Rannanjärvi [Fri, 12 Aug 2016 22:51:32 +0000 (01:51 +0300)] 
lib-storage: rename get_real_mail to get_backend_mail

Also change the function signature so that it returns an int to indicate
success or failure.

9 years agodoveadm: fix compile warning in doveadm-dump-index
Martti Rannanjärvi [Thu, 27 Oct 2016 00:58:21 +0000 (03:58 +0300)] 
doveadm: fix compile warning in doveadm-dump-index

9 years agodoveadm dump: Dump mailbox names in mailbox.list.index's header.
Timo Sirainen [Wed, 26 Oct 2016 20:20:17 +0000 (23:20 +0300)] 
doveadm dump: Dump mailbox names in mailbox.list.index's header.