]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
7 years agoauth: Fix compiling crypt-blowfish with i386
Timo Sirainen [Mon, 16 Oct 2017 13:42:43 +0000 (16:42 +0300)] 
auth: Fix compiling crypt-blowfish with i386

We're not going to support any assembly code, so remove BF_ASM entirely.

7 years agodoveadm-server: http: Fixed lingering connections after the request is sent.
Stephan Bosch [Tue, 17 Oct 2017 01:19:19 +0000 (03:19 +0200)] 
doveadm-server: http: Fixed lingering connections after the request is sent.

Turns out conn->http_client is already NULL while doveadm_http_server_connection_destroy() is called.
This is because http_server_connection_unref() sets it to NULL;
Fixed by removing useless HTTP connection reference.

7 years agocassandra: Support "timestamp" type fields properly
Timo Sirainen [Mon, 16 Oct 2017 12:41:56 +0000 (15:41 +0300)] 
cassandra: Support "timestamp" type fields properly

Fixes setting them with prepared statements. Reading them never worked
earlier.

7 years agocassandra: Include "prepared" when logging about prepared statement queries
Timo Sirainen [Mon, 16 Oct 2017 12:12:12 +0000 (15:12 +0300)] 
cassandra: Include "prepared" when logging about prepared statement queries

Mainly useful for debugging/testing.

7 years agocassandra: Fix using bigint types with unprepared statements
Timo Sirainen [Mon, 16 Oct 2017 11:49:56 +0000 (14:49 +0300)] 
cassandra: Fix using bigint types with unprepared statements

This reverts the code to not using the statements with binding at all.
Alternative fix would be to start using explicit int32 or int64 parameter
types, but that breaks backwards compatibility a bit.

7 years agolibpassword: Deinitialize hash iterator in password_scheme_detect
Aki Tuomi [Mon, 16 Oct 2017 15:39:14 +0000 (18:39 +0300)] 
libpassword: Deinitialize hash iterator in password_scheme_detect

Otherwise it will leak memory

7 years agoipc: Improve error logging when IPC server is disconnected
Timo Sirainen [Tue, 22 Aug 2017 13:29:25 +0000 (16:29 +0300)] 
ipc: Improve error logging when IPC server is disconnected

7 years agolib-dict-backend: Fix linking test-dict-sql
Timo Sirainen [Mon, 16 Oct 2017 10:34:35 +0000 (13:34 +0300)] 
lib-dict-backend: Fix linking test-dict-sql

dict_drivers_register_builtin() wasn't found.

7 years agolibpassword: Add BLF-CRYPT support independent of crypt
Aki Tuomi [Tue, 10 Oct 2017 12:04:28 +0000 (15:04 +0300)] 
libpassword: Add BLF-CRYPT support independent of crypt

7 years agoauth: Fix typo in blowfish name
Aki Tuomi [Tue, 10 Oct 2017 11:24:44 +0000 (14:24 +0300)] 
auth: Fix typo in blowfish name

7 years agolib-fs: Fix fs_wrapper_write_stream_finish() to work with async parent fs
Timo Sirainen [Mon, 16 Oct 2017 10:53:58 +0000 (13:53 +0300)] 
lib-fs: Fix fs_wrapper_write_stream_finish() to work with async parent fs

This only became a problem with the previous fs-compress change.

7 years agologin-common: Use HAproxy provided proxy.ssl information
Aki Tuomi [Mon, 18 Sep 2017 12:27:38 +0000 (15:27 +0300)] 
login-common: Use HAproxy provided proxy.ssl information

If the connection is proxied via system that can terminate
ssl for us, such as HAproxy, use that information only.

7 years agolib-master: Support HAproxy TLVs
Aki Tuomi [Mon, 18 Sep 2017 12:25:21 +0000 (15:25 +0300)] 
lib-master: Support HAproxy TLVs

This allows passing in information about SSL and client
certificate(s) and other information from haproxy.

7 years agolib-master: Use pooled memory for haproxy
Aki Tuomi [Tue, 3 Oct 2017 08:15:54 +0000 (11:15 +0300)] 
lib-master: Use pooled memory for haproxy

7 years agolib-master: Fix haproxy reading code to read data incrementally
Aki Tuomi [Mon, 18 Sep 2017 12:21:04 +0000 (15:21 +0300)] 
lib-master: Fix haproxy reading code to read data incrementally

7 years agolibpassword: Add support for ARGON2 scheme
Aki Tuomi [Tue, 10 Oct 2017 14:58:03 +0000 (17:58 +0300)] 
libpassword: Add support for ARGON2 scheme

7 years agoconfigure: Detect libsodium presence
Aki Tuomi [Tue, 10 Oct 2017 12:24:17 +0000 (15:24 +0300)] 
configure: Detect libsodium presence

7 years agoacl plugin: avoid "'struct stat' declared inside parameter list" warning
Josef 'Jeff' Sipek [Wed, 11 Oct 2017 20:33:57 +0000 (16:33 -0400)] 
acl plugin: avoid "'struct stat' declared inside parameter list" warning

7 years agofs-compress: Allow compress level 0 to skip compression
Timo Sirainen [Fri, 13 Oct 2017 09:34:01 +0000 (12:34 +0300)] 
fs-compress: Allow compress level 0 to skip compression

This can be useful when combined with the "maybe-" prefix, so Dovecot will
support reading compressed files without creating new ones.

7 years agoAdded "ULL" to the hex literals that needed it.
Bill Cole [Tue, 10 Oct 2017 21:40:04 +0000 (17:40 -0400)] 
Added "ULL" to the hex literals that needed it.

On 32-bit platforms with older compilers (e.g. gcc 4.2 on MacOS 10.6
running on a 1st-gen Core Duo) a 'long' is 4 bytes and the compiler does
not automatically use a 'long long' when needed, but instead generates
an error. e.g.:

libtool: compile:  /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib -I../../../src/lib-mail -I../../../src/lib-index -I../../../src/lib-storage -I../../../src/plugins/fts -I../../../src/doveadm -I/opt/local/include/openssl -I/opt/local/include -I/opt/local/include/CLucene/ext -pipe -Os -arch i386 -D__STDC_LIMIT_MACROS -MT lucene-wrapper.lo -MD -MP -MF .deps/lucene-wrapper.Tpo -c lucene-wrapper.cc  -fno-common -DPIC -o .libs/lucene-wrapper.o
In file included from ../../../src/lib/lib.h:33,
                 from lucene-wrapper.cc:4:
../../../src/lib/byteorder.h:94: error: integer constant is too large for ‘long’ type
../../../src/lib/byteorder.h:95: error: integer constant is too large for ‘long’ type
../../../src/lib/byteorder.h:96: error: integer constant is too large for ‘long’ type
../../../src/lib/byteorder.h:97: error: integer constant is too large for ‘long’ type
make[4]: *** [lucene-wrapper.lo] Error 1

Adding the 'ULL' to the end of the 16-digit hex literals that are used
to test the structure of 64-bit integers fixes this and avoids any
problem which could arise from the compiler using a 32-bit type for
those literals that could fit in 32 bites.

7 years agodoveadm proxy: Don't crash if remote doesn't support log proxying
Timo Sirainen [Sat, 14 Oct 2017 09:54:18 +0000 (12:54 +0300)] 
doveadm proxy: Don't crash if remote doesn't support log proxying

7 years agolib-storage: Add settings to configure lib-index optimization parameters
Timo Sirainen [Mon, 9 Oct 2017 13:37:08 +0000 (16:37 +0300)] 
lib-storage: Add settings to configure lib-index optimization parameters

The defaults are expected to be pretty good, but these settings make it
easier to test whether other values might be more optimal.

7 years agolib-index: Add mail_index_cache_optimization_settings
Timo Sirainen [Mon, 9 Oct 2017 12:37:51 +0000 (15:37 +0300)] 
lib-index: Add mail_index_cache_optimization_settings

7 years agolib-index: Add mail_index_base_optimization_settings
Timo Sirainen [Mon, 9 Oct 2017 12:24:45 +0000 (15:24 +0300)] 
lib-index: Add mail_index_base_optimization_settings

7 years agolib-index: Replace mail_index_set_log_rotation() with mail_index_set_optimization_set...
Timo Sirainen [Mon, 9 Oct 2017 12:15:08 +0000 (15:15 +0300)] 
lib-index: Replace mail_index_set_log_rotation() with mail_index_set_optimization_settings()

This allows more easily adding optimization-related settings.

7 years agolib-dict: Remove test_dict_sql
Aki Tuomi [Wed, 11 Oct 2017 09:42:11 +0000 (12:42 +0300)] 
lib-dict: Remove test_dict_sql

It got accidentically added in 149299c7

7 years agolib-master: Allow a second log initialization after settings have been read.
Timo Sirainen [Wed, 11 Oct 2017 10:03:51 +0000 (13:03 +0300)] 
lib-master: Allow a second log initialization after settings have been read.

This fixes logging with services that bypass the log service (lda or -L
parameter).

7 years agofs-compress: Support reading uncompressed input by prefixing compression format with...
Timo Sirainen [Fri, 6 Oct 2017 15:33:24 +0000 (18:33 +0300)] 
fs-compress: Support reading uncompressed input by prefixing compression format with "maybe-"

7 years agolib: Add istream-try
Timo Sirainen [Fri, 6 Oct 2017 15:31:12 +0000 (18:31 +0300)] 
lib: Add istream-try

This can be used to automatically detect the underlying istream format from
a given list of choices.

7 years agolib: io_stream_set_error() - Allow one of the parameters to be the old error
Timo Sirainen [Mon, 9 Oct 2017 15:31:52 +0000 (18:31 +0300)] 
lib: io_stream_set_error() - Allow one of the parameters to be the old error

7 years agoglobal: Use check-local in Makefile.am instead of overriding check directly
Timo Sirainen [Wed, 4 Oct 2017 18:45:18 +0000 (21:45 +0300)] 
global: Use check-local in Makefile.am instead of overriding check directly

This helps with dependency problems, like running "make check" in
lib-storage without "make" first would try to compile the test programs
too early and fail.

7 years agolib-sql, lib-ldap: Fix link dependencies
Timo Sirainen [Sun, 8 Oct 2017 18:08:14 +0000 (21:08 +0300)] 
lib-sql, lib-ldap: Fix link dependencies

Fixes using the gold linker.

7 years agolib: ostream-multiplex - ignore flush return value
Timo Sirainen [Tue, 10 Oct 2017 12:38:13 +0000 (15:38 +0300)] 
lib: ostream-multiplex - ignore flush return value

There's nothing that can be done about it at close() time. Silences static
analyzer warnings.

7 years agolib: ostream-multiplex - remove unnecessary flushes
Timo Sirainen [Tue, 10 Oct 2017 12:37:39 +0000 (15:37 +0300)] 
lib: ostream-multiplex - remove unnecessary flushes

7 years agolib: istream-multiplex - Minor optimization
Timo Sirainen [Tue, 10 Oct 2017 09:33:08 +0000 (12:33 +0300)] 
lib: istream-multiplex - Minor optimization

There's no need to find channel when we already know it. This also helps
static analyzers to understand that req_channel can't be NULL.

7 years agoostream-multiplex: Check flush return value
Aki Tuomi [Fri, 6 Oct 2017 06:02:49 +0000 (09:02 +0300)] 
ostream-multiplex: Check flush return value

7 years agoglobal: Use i_close_fd instead of close
Aki Tuomi [Fri, 6 Oct 2017 05:58:16 +0000 (08:58 +0300)] 
global: Use i_close_fd instead of close

Some were missed, found by coverity

7 years agotest-ostream-escaped: Check flush return value
Aki Tuomi [Fri, 6 Oct 2017 05:55:33 +0000 (08:55 +0300)] 
test-ostream-escaped: Check flush return value

Found by coverity

7 years agodoveadm-server: Remove flush before multiplex
Aki Tuomi [Fri, 6 Oct 2017 05:54:38 +0000 (08:54 +0300)] 
doveadm-server: Remove flush before multiplex

It's not really necessary, found by coverity

7 years agoiostream-multiplex: Check return values in tests
Aki Tuomi [Fri, 6 Oct 2017 05:52:18 +0000 (08:52 +0300)] 
iostream-multiplex: Check return values in tests

7 years agodoveadm: Return after destroying connection
Aki Tuomi [Fri, 6 Oct 2017 05:46:00 +0000 (08:46 +0300)] 
doveadm: Return after destroying connection

Prevents NULL deferences, found by coverity.

8 years agoostream-multiplex: Unreference stream parent
Aki Tuomi [Mon, 9 Oct 2017 15:21:24 +0000 (18:21 +0300)] 
ostream-multiplex: Unreference stream parent

Otherwise it won't get free'd.

8 years agodoveadm: Add remote(host) prefix to all proxied logs
Timo Sirainen [Mon, 9 Oct 2017 10:55:06 +0000 (13:55 +0300)] 
doveadm: Add remote(host) prefix to all proxied logs

8 years agodoveadm log test: Fix it to work again
Timo Sirainen [Mon, 9 Oct 2017 11:28:17 +0000 (14:28 +0300)] 
doveadm log test: Fix it to work again

Broken by 719abeb2088987f213a33a7dd1fe78958beaef03

8 years agolib: ostream-multiplex - set ostream_private.parent
Timo Sirainen [Mon, 9 Oct 2017 10:19:32 +0000 (13:19 +0300)] 
lib: ostream-multiplex - set ostream_private.parent

Unlike with istream-multiplex, there are no issues with I/Os. Only the
parent stream will have the I/O. Using the default parent adds the
missing methods that otherwise would have needed to be implemented:
 - cork
 - flush_pending
 - switch_ioloop

8 years agolib: istream-multiplex - Forward i_stream_switch_ioloop() to parent
Timo Sirainen [Mon, 9 Oct 2017 10:14:23 +0000 (13:14 +0300)] 
lib: istream-multiplex - Forward i_stream_switch_ioloop() to parent

Most istreams do this because istream_private.parent is set to the parent
stream, but this can't be done with istream-multiplex. The main problem
with attempting to do the same with istream-multiplex is that the different
channels don't share the same I/O. Just because one channel received data
doesn't mean that other channels received any data. (It would be possible
to solve this by implementing a new method that allows overriding
i_stream_set_io(), but I'm not sure if that's a good idea either.)

8 years agoacl: Fix compiler warning with -Wstrict-bool
Timo Sirainen [Sun, 8 Oct 2017 22:22:47 +0000 (01:22 +0300)] 
acl: Fix compiler warning with -Wstrict-bool

8 years agodoveadm-mail-crypt: Print existing folder key hash when aborting generate
Martti Rannanjärvi [Fri, 6 Oct 2017 09:47:06 +0000 (12:47 +0300)] 
doveadm-mail-crypt: Print existing folder key hash when aborting generate

8 years agoacl: Fix checking create (k) permission in global acl-file
Timo Sirainen [Fri, 6 Oct 2017 13:55:28 +0000 (16:55 +0300)] 
acl: Fix checking create (k) permission in global acl-file

Just because the global ACL file hasn't changed since it was last refreshed
for another ACL object, it doesn't mean that those ACLs don't need to be
applied to this ACL object.

This didn't usually cause problems, because the initial ACL object refresh
was always done due to local-path refresh returning "needs a refresh".
The only exception was when acl_object_init_from_parent() was called,
because it added an empty non-NULL validity for the local-path, so the
"needs a refresh" wasn't returned. This happened only when trying to
CREATE or RENAME mailbox under a parent where user didn't have create
permissions.

This affected only when using a single global acl-file, not when using
global acl directory containing per-mailbox files.

8 years agoacl: Cleanup - move code to a new acl_vfile_validity_has_changed()
Timo Sirainen [Fri, 6 Oct 2017 13:54:20 +0000 (16:54 +0300)] 
acl: Cleanup - move code to a new acl_vfile_validity_has_changed()

8 years agoacl: Fix checking whether global acl-file has changed
Timo Sirainen [Fri, 6 Oct 2017 13:44:01 +0000 (16:44 +0300)] 
acl: Fix checking whether global acl-file has changed

We always assumed that it was changed and re-read it.

8 years agodict-sql: dict doesn't support NULL values, so convert SQL NULLs to ""
Timo Sirainen [Fri, 6 Oct 2017 12:54:47 +0000 (15:54 +0300)] 
dict-sql: dict doesn't support NULL values, so convert SQL NULLs to ""

8 years agolib-sql: Add comments about NULL values.
Timo Sirainen [Fri, 6 Oct 2017 12:52:36 +0000 (15:52 +0300)] 
lib-sql: Add comments about NULL values.

8 years agoglobal: Use PRIdTIME_T and PRIxTIME_T format specifiers
Martti Rannanjärvi [Tue, 3 Oct 2017 14:28:39 +0000 (17:28 +0300)] 
global: Use PRIdTIME_T and PRIxTIME_T format specifiers

8 years agomaster,stats: Use time_t instead of unsigned long to count seconds
Martti Rannanjärvi [Fri, 6 Oct 2017 12:10:53 +0000 (15:10 +0300)] 
master,stats: Use time_t instead of unsigned long to count seconds

8 years agom4: Add PRIdTIME_T and PRIxTIME_T format specifiers
Martti Rannanjärvi [Tue, 19 Sep 2017 16:39:19 +0000 (19:39 +0300)] 
m4: Add PRIdTIME_T and PRIxTIME_T format specifiers

8 years agoglobal: Use PRI* macros and %zu instead of casting
Martti Rannanjärvi [Tue, 19 Sep 2017 08:57:18 +0000 (11:57 +0300)] 
global: Use PRI* macros and %zu instead of casting

8 years agopop3: Expand settings to fix rawlog_dir
Timo Sirainen [Fri, 6 Oct 2017 11:39:00 +0000 (14:39 +0300)] 
pop3: Expand settings to fix rawlog_dir

Even if %variables weren't used in rawlog_dir, the path was always prefixed
with "0".

8 years agolib-settings: Add assert to help static analyzer
Timo Sirainen [Fri, 6 Oct 2017 11:52:54 +0000 (14:52 +0300)] 
lib-settings: Add assert to help static analyzer

8 years agomail-crypt: test-mail-key - Fix potential crash on a failed test
Timo Sirainen [Fri, 6 Oct 2017 11:50:35 +0000 (14:50 +0300)] 
mail-crypt: test-mail-key - Fix potential crash on a failed test

Avoids "Uninitialized argument value" warning from static analyzer.

8 years agolib: test-mempool-alloconly - help static analyzer understand that pool is non-NULL
Timo Sirainen [Fri, 6 Oct 2017 11:48:37 +0000 (14:48 +0300)] 
lib: test-mempool-alloconly - help static analyzer understand that pool is non-NULL

8 years agolib: istream-multiplex - remove dead assignment
Timo Sirainen [Fri, 6 Oct 2017 11:43:57 +0000 (14:43 +0300)] 
lib: istream-multiplex - remove dead assignment

8 years agodoveadm-mail-crypt: Print existing userkey hash when aborting generate
Martti Rannanjärvi [Fri, 6 Oct 2017 08:07:23 +0000 (11:07 +0300)] 
doveadm-mail-crypt: Print existing userkey hash when aborting generate

8 years agolib: don't use foo_real()-style symbols in a header file
Josef 'Jeff' Sipek [Wed, 4 Oct 2017 13:01:43 +0000 (09:01 -0400)] 
lib: don't use foo_real()-style symbols in a header file

While there is precedent for symbols getting _real suffix to hide
implementation details, all the existing symbols were static until
the recent i_fd_close*() changes.  This commit makes this true again.

8 years agolib: move i_fd_close*() to fd-util.[ch]
Josef 'Jeff' Sipek [Wed, 4 Oct 2017 12:58:36 +0000 (08:58 -0400)] 
lib: move i_fd_close*() to fd-util.[ch]

8 years agolib: move fd_close_maybe_stdio() to fd-util.[ch]
Josef 'Jeff' Sipek [Wed, 4 Oct 2017 12:52:13 +0000 (08:52 -0400)] 
lib: move fd_close_maybe_stdio() to fd-util.[ch]

8 years agolib: move fd_set_nonblock() to fd-util.[ch]
Josef 'Jeff' Sipek [Wed, 4 Oct 2017 12:42:56 +0000 (08:42 -0400)] 
lib: move fd_set_nonblock() to fd-util.[ch]

8 years agolib: move fd-close-on-exec.[ch] code into fd-util.[ch]
Josef 'Jeff' Sipek [Wed, 4 Oct 2017 12:28:38 +0000 (08:28 -0400)] 
lib: move fd-close-on-exec.[ch] code into fd-util.[ch]

8 years agoglobal: stop including fd-set-nonblock.h & fd-close-on-exec.h directly
Josef 'Jeff' Sipek [Thu, 5 Oct 2017 17:06:09 +0000 (13:06 -0400)] 
global: stop including fd-set-nonblock.h & fd-close-on-exec.h directly

8 years agolib: always include fd-close-on-exec.h & fd-set-nonblock.h via fd-util.h
Josef 'Jeff' Sipek [Thu, 5 Oct 2017 17:05:20 +0000 (13:05 -0400)] 
lib: always include fd-close-on-exec.h & fd-set-nonblock.h via fd-util.h

8 years agolib: iostream-multiplex tests - Fix hangs by setting the pipe fds non-blocking
Timo Sirainen [Thu, 5 Oct 2017 17:25:29 +0000 (20:25 +0300)] 
lib: iostream-multiplex tests - Fix hangs by setting the pipe fds non-blocking

8 years agolib: istream-multiplex - Minor code cleanup
Timo Sirainen [Thu, 5 Oct 2017 17:24:11 +0000 (20:24 +0300)] 
lib: istream-multiplex - Minor code cleanup

Avoid propagating the error twice, and avoid any confusion about what "got"
actually contains.

8 years agodict-ldap: Link directly to dict binary, unless --with-ldap=plugin was used
Timo Sirainen [Wed, 4 Oct 2017 18:13:13 +0000 (21:13 +0300)] 
dict-ldap: Link directly to dict binary, unless --with-ldap=plugin was used

This is similar to how authdb_ldap plugin is built.

8 years agodict-ldap: Move from plugins/dict-ldap to lib-dict-backend
Timo Sirainen [Wed, 4 Oct 2017 18:01:18 +0000 (21:01 +0300)] 
dict-ldap: Move from plugins/dict-ldap to lib-dict-backend

8 years agolib-dict-backend: Build test-dict-sql even without "make check"
Timo Sirainen [Wed, 4 Oct 2017 17:48:24 +0000 (20:48 +0300)] 
lib-dict-backend: Build test-dict-sql even without "make check"

There's no longer a dependency problem.

8 years agolib-dict: Move libdict_backend to lib-dict-backend
Timo Sirainen [Wed, 4 Oct 2017 17:46:10 +0000 (20:46 +0300)] 
lib-dict: Move libdict_backend to lib-dict-backend

8 years agomail-crypt: Improve doveadm output
Aki Tuomi [Thu, 5 Oct 2017 12:53:16 +0000 (15:53 +0300)] 
mail-crypt: Improve doveadm output

8 years agomail-crypt: Fix key generation handling
Aki Tuomi [Thu, 5 Oct 2017 12:40:45 +0000 (15:40 +0300)] 
mail-crypt: Fix key generation handling

Userkey generation would not set all required fields.

8 years agodirector: When ring is synced, purge any pending "removed" directors
Timo Sirainen [Thu, 5 Oct 2017 09:34:10 +0000 (12:34 +0300)] 
director: When ring is synced, purge any pending "removed" directors

This allows adding a director back to the ring without having to wait for 30
seconds.

8 years agodirector: Rename director_delayed_dir_remove_timeout() to director_hosts_purge_removed()
Timo Sirainen [Tue, 3 Oct 2017 13:40:32 +0000 (16:40 +0300)] 
director: Rename director_delayed_dir_remove_timeout() to director_hosts_purge_removed()

This allows using it for other purposes without having a confusing name.

8 years agodirector: Fix potential panic when director is alone
Timo Sirainen [Thu, 5 Oct 2017 13:12:38 +0000 (16:12 +0300)] 
director: Fix potential panic when director is alone

If director is alone and it can't connect to other directors, it might crash
with:

Panic: file director.c: line 318 (director_set_ring_synced): assertion failed: (!dir->ring_synced)

8 years agoglobal: Remove dead code
Timo Sirainen [Thu, 5 Oct 2017 10:42:07 +0000 (13:42 +0300)] 
global: Remove dead code

Found with clang static analyzer.

8 years agodict-memcached: Response status may not be included in enum memcached_response
Timo Sirainen [Thu, 5 Oct 2017 10:39:49 +0000 (13:39 +0300)] 
dict-memcached: Response status may not be included in enum memcached_response

This helps at least static analyzers figure out that other statuses are
possible, although unexpected.

8 years agolib-test: Use i_unreached() for marking unreachable code in test fatal handler
Timo Sirainen [Thu, 5 Oct 2017 10:26:03 +0000 (13:26 +0300)] 
lib-test: Use i_unreached() for marking unreachable code in test fatal handler

This avoids a warning with static analyzer.

8 years agoauth: LDAP request queue has no size limit anymore - remove dead code
Timo Sirainen [Thu, 5 Oct 2017 10:23:19 +0000 (13:23 +0300)] 
auth: LDAP request queue has no size limit anymore - remove dead code

8 years agombox: Remove unnecessary check from assert - move_diff is always negative here
Timo Sirainen [Thu, 5 Oct 2017 10:17:59 +0000 (13:17 +0300)] 
mbox: Remove unnecessary check from assert - move_diff is always negative here

8 years agozlib: zlib_mailbox_open_input() can't fail - remove dead code
Timo Sirainen [Thu, 5 Oct 2017 10:14:55 +0000 (13:14 +0300)] 
zlib: zlib_mailbox_open_input() can't fail - remove dead code

8 years agolib-storage: imapc_mailbox_get_selected_status() can't fail - remove dead code
Timo Sirainen [Thu, 5 Oct 2017 10:02:21 +0000 (13:02 +0300)] 
lib-storage: imapc_mailbox_get_selected_status() can't fail - remove dead code

8 years agodoveadm-server: Use i_close_fd
Aki Tuomi [Wed, 4 Oct 2017 06:42:02 +0000 (09:42 +0300)] 
doveadm-server: Use i_close_fd

8 years agodoveadm: Deliver remote logs over doveadm socket
Aki Tuomi [Thu, 24 Aug 2017 11:59:07 +0000 (14:59 +0300)] 
doveadm: Deliver remote logs over doveadm socket

8 years agodoveadm: Refactor server/client code to support versioning properly
Aki Tuomi [Thu, 24 Aug 2017 11:45:22 +0000 (14:45 +0300)] 
doveadm: Refactor server/client code to support versioning properly

This way we can distinguish between old and new server side

8 years agodoveadm-server: Refactor connection handshake and authentication
Aki Tuomi [Tue, 12 Sep 2017 10:43:30 +0000 (13:43 +0300)] 
doveadm-server: Refactor connection handshake and authentication

Simplifies next change

8 years agolib: Add multiplex stream support
Aki Tuomi [Tue, 22 Aug 2017 07:14:22 +0000 (10:14 +0300)] 
lib: Add multiplex stream support

This allows having multiple channels of data in single stream.

8 years agodirector: Allow doveadm director ring remove for the same director
Timo Sirainen [Thu, 5 Oct 2017 08:51:23 +0000 (11:51 +0300)] 
director: Allow doveadm director ring remove for the same director

Fixes:
Panic: file doveadm-connection.c: line 859 (doveadm_connection_cmd_run): assertion failed: (conn->dir->right == NULL && conn->dir->left == NULL)

8 years agodirector: Don't crash on doveadm director ring remove for unknown director
Timo Sirainen [Thu, 5 Oct 2017 08:49:31 +0000 (11:49 +0300)] 
director: Don't crash on doveadm director ring remove for unknown director

Ring syncing isn't started, so it shouldn't try to wait for ring sync.

Fixes:
Panic: file doveadm-connection.c: line 859 (doveadm_connection_cmd_run): assertion failed: (conn->dir->right == NULL && conn->dir->left == NULL)

8 years agodirector: Don't crash if DIRECTOR-REMOVE is received for itself
Timo Sirainen [Thu, 5 Oct 2017 08:46:55 +0000 (11:46 +0300)] 
director: Don't crash if DIRECTOR-REMOVE is received for itself

This triggers the director removal from the ring, which causes the
connection to be destroyed. But since we're still in the middle of handling
the connection it needs refcounting.

8 years agolib: istream-file - set blocking=TRUE automatically for blocking sockets
Timo Sirainen [Wed, 4 Oct 2017 12:11:18 +0000 (15:11 +0300)] 
lib: istream-file - set blocking=TRUE automatically for blocking sockets

This fixes it to be correct with various doveadm commands.

8 years agolib: istream-file/unix - don't ignore EINTR for blocking istream reads
Timo Sirainen [Wed, 4 Oct 2017 12:08:07 +0000 (15:08 +0300)] 
lib: istream-file/unix - don't ignore EINTR for blocking istream reads

Just fail the istream read entirely. Although there's a small possibility
that this interrupt was unwanted and should be retried, it's more likely
that a blocking istream is hanging and admin wants to stop the process.
If the EINTR is ignored all the time, it's not possible to abort a
blocking read with ^C or anything else than SIGKILL.

8 years agolib: test-istream-unix - Use i_stream_set_blocking()
Timo Sirainen [Wed, 4 Oct 2017 17:14:05 +0000 (20:14 +0300)] 
lib: test-istream-unix - Use i_stream_set_blocking()

8 years agolib: Add i_stream_set_blocking()
Timo Sirainen [Wed, 4 Oct 2017 17:13:49 +0000 (20:13 +0300)] 
lib: Add i_stream_set_blocking()