]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
9 years agolib: istream-chain didn't update its max_buffer_size
Timo Sirainen [Wed, 1 Jun 2016 15:03:58 +0000 (18:03 +0300)] 
lib: istream-chain didn't update its max_buffer_size

I had this code at some point earlier, but looks like it got lost from the
final commit.

9 years agolib-compression: istream.max_buffer_size == 0 isn't unlimited.
Timo Sirainen [Wed, 1 Jun 2016 14:52:23 +0000 (17:52 +0300)] 
lib-compression: istream.max_buffer_size == 0 isn't unlimited.

9 years agofs-metawrap: Removed unnecessary code.
Timo Sirainen [Wed, 1 Jun 2016 14:18:23 +0000 (17:18 +0300)] 
fs-metawrap: Removed unnecessary code.

As mentioned in a0cf7d392, this can't happen.

9 years agolib-fs: Improved unit tests.
Timo Sirainen [Wed, 1 Jun 2016 14:12:51 +0000 (17:12 +0300)] 
lib-fs: Improved unit tests.

9 years agofs-metawrap: Removed unnecessary code.
Timo Sirainen [Wed, 1 Jun 2016 14:12:10 +0000 (17:12 +0300)] 
fs-metawrap: Removed unnecessary code.

The caller already set success==FALSE if ostream was closed.

9 years agolib-fs: Added more asserts
Timo Sirainen [Wed, 1 Jun 2016 14:11:53 +0000 (17:11 +0300)] 
lib-fs: Added more asserts

9 years agolib-fs: Clarified fs_write_stream_abort() API and dropped its _async().
Timo Sirainen [Wed, 1 Jun 2016 14:06:28 +0000 (17:06 +0300)] 
lib-fs: Clarified fs_write_stream_abort() API and dropped its _async().

We can't handle an abort after an async fs_write_stream_finish() is already
going.

9 years agolib-fs: Added fs_write_stream_abort_async()
Timo Sirainen [Wed, 1 Jun 2016 12:15:19 +0000 (15:15 +0300)] 
lib-fs: Added fs_write_stream_abort_async()

9 years agolib: Fix to previous istream-chain max_buffer_size handling
Timo Sirainen [Wed, 1 Jun 2016 10:30:22 +0000 (13:30 +0300)] 
lib: Fix to previous istream-chain max_buffer_size handling

We were casting the wrong stream.

9 years agofs-metawrap: Fixed buffer size while reading metadata header.
Timo Sirainen [Tue, 31 May 2016 19:33:32 +0000 (22:33 +0300)] 
fs-metawrap: Fixed buffer size while reading metadata header.

It's not enough to have the buffer size set to "large enough" at the time of
the stream creation, because i_stream_set_max_buffer_size() could be called
afterwards.

9 years agolib: Fixed max_buffer_size handling in istream-chain
Timo Sirainen [Tue, 31 May 2016 19:19:37 +0000 (22:19 +0300)] 
lib: Fixed max_buffer_size handling in istream-chain

The default max_buffer_size=256 was wrong in all situations.

We're now assuming that the underlying istreams' max_buffer_size is always
correct. While gluing together two streams we're now allocating enough
memory to hold all of the wanted data (instead of assert-crashing as could
have happened earlier). This means that the max memory usage is actually
the two streams' max_buffer_size summed together. Ideally this would be
fixed to limit the max_buffer_size to maximum of the two, but that would
require further changes.

9 years ago[LEN] to [static LEN] on some function parameters
Martti Rannanjärvi [Tue, 10 May 2016 07:19:57 +0000 (10:19 +0300)] 
[LEN] to [static LEN] on some function parameters

Also add STATIC_ARRAY macro to hide it in c++ compilation.

9 years agodoveadm: Do not use INT64 with mail cmds yet
Aki Tuomi [Wed, 1 Jun 2016 05:43:23 +0000 (08:43 +0300)] 
doveadm: Do not use INT64 with mail cmds yet

9 years agolib-dcrypt: Fixed check program dependencies
Timo Sirainen [Tue, 31 May 2016 23:01:10 +0000 (02:01 +0300)] 
lib-dcrypt: Fixed check program dependencies

9 years agolib-dcrypt: Fixed dcrypt_openssl_generate_keypair()
Timo Sirainen [Tue, 31 May 2016 21:19:41 +0000 (00:19 +0300)] 
lib-dcrypt: Fixed dcrypt_openssl_generate_keypair()

9 years agolib: Fixed file_copy() after recent changes.
Timo Sirainen [Tue, 31 May 2016 21:12:44 +0000 (00:12 +0300)] 
lib: Fixed file_copy() after recent changes.

9 years agodict-client: Fixed idle_msecs setting.
Timo Sirainen [Tue, 31 May 2016 14:16:17 +0000 (17:16 +0300)] 
dict-client: Fixed idle_msecs setting.

9 years agolib-fs: Don't duplicate backend name in fs_init() errors.
Timo Sirainen [Tue, 31 May 2016 14:06:29 +0000 (17:06 +0300)] 
lib-fs: Don't duplicate backend name in fs_init() errors.

fs_init() already adds the "backend: " prefix to the error_r, so the callers
shouldn't do it again.

9 years agolib-storage: Fixed error_r with mail_storage_service_lookup_next()
Timo Sirainen [Tue, 31 May 2016 14:01:41 +0000 (17:01 +0300)] 
lib-storage: Fixed error_r with mail_storage_service_lookup_next()

We no longer want to hide the actual error message.

9 years agolib: iostream-temp: Fixed o_stream_send_istream()
Timo Sirainen [Tue, 31 May 2016 09:24:01 +0000 (12:24 +0300)] 
lib: iostream-temp: Fixed o_stream_send_istream()

9 years agolib-dcrypt: Use base64 encoded test samples
Aki Tuomi [Mon, 30 May 2016 19:39:39 +0000 (22:39 +0300)] 
lib-dcrypt: Use base64 encoded test samples

9 years agolib-dcrypt: Fix strict type-punning warning
Aki Tuomi [Mon, 30 May 2016 19:33:29 +0000 (22:33 +0300)] 
lib-dcrypt: Fix strict type-punning warning

9 years agolib-dcrypt: Fix various OpenSSL API usage issues
Aki Tuomi [Mon, 30 May 2016 19:30:31 +0000 (22:30 +0300)] 
lib-dcrypt: Fix various OpenSSL API usage issues

9 years agolib-dcrypt: Remove duplication of samples
Aki Tuomi [Mon, 30 May 2016 19:05:22 +0000 (22:05 +0300)] 
lib-dcrypt: Remove duplication of samples

9 years agolib-dcrypt: Finish previous t_malloc() change.
Timo Sirainen [Mon, 30 May 2016 18:41:12 +0000 (21:41 +0300)] 
lib-dcrypt: Finish previous t_malloc() change.

9 years agoReplace some t_malloc_no0 calls with t_malloc0
Martti Rannanjärvi [Tue, 17 May 2016 08:38:14 +0000 (11:38 +0300)] 
Replace some t_malloc_no0 calls with t_malloc0

This might increase safety.

9 years agoUse t_new in complicated t_malloc_no0 calls
Martti Rannanjärvi [Tue, 17 May 2016 07:56:53 +0000 (10:56 +0300)] 
Use t_new in complicated t_malloc_no0 calls

9 years agoRemove t_malloc in favour of t_malloc_no0
Martti Rannanjärvi [Tue, 17 May 2016 07:35:35 +0000 (10:35 +0300)] 
Remove t_malloc in favour of t_malloc_no0

Using either t_malloc_no0 or t_malloc0 makes it clear whether the
allocated memory is zeroed or not.

9 years agoo_stream_send_istream() API changed again
Timo Sirainen [Fri, 20 May 2016 12:16:41 +0000 (15:16 +0300)] 
o_stream_send_istream() API changed again

The new API enforces the caller to correctly handle all the possible
situations. It also makes in unambiguous whether to wait for input or
output stream.

9 years agolib-dcrypt: Always allow error_r to be NULL.
Timo Sirainen [Mon, 30 May 2016 18:14:53 +0000 (21:14 +0300)] 
lib-dcrypt: Always allow error_r to be NULL.

Especially dcrypt_openssl_private_to_public_key() was called with
error_r=NULL by the dcrypt.c itself.

9 years agolib-dcrypt: sample-v2.bin shouldn't be executable
Timo Sirainen [Mon, 30 May 2016 16:38:22 +0000 (19:38 +0300)] 
lib-dcrypt: sample-v2.bin shouldn't be executable

9 years agolib-dcrypt: Compiler warning fixes
Timo Sirainen [Mon, 30 May 2016 12:36:17 +0000 (15:36 +0300)] 
lib-dcrypt: Compiler warning fixes

9 years agolib-storage: mail_storage_service_next() now returns error string.
Timo Sirainen [Fri, 27 May 2016 10:01:41 +0000 (13:01 +0300)] 
lib-storage: mail_storage_service_next() now returns error string.

9 years agolib-storage: mail_storage_service_lookup() now returns the full error.
Timo Sirainen [Fri, 27 May 2016 09:55:36 +0000 (12:55 +0300)] 
lib-storage: mail_storage_service_lookup() now returns the full error.

9 years agolmtp, quota-status: Don't send mail_storage_service_lookup() error to client.
Timo Sirainen [Fri, 27 May 2016 09:49:30 +0000 (12:49 +0300)] 
lmtp, quota-status: Don't send mail_storage_service_lookup() error to client.

This is in preparation for changing the returned error to contain the full
error string. The current error string is pretty useless for any purpose.

9 years agodoveadm mailbox delete: Added --unsafe option.
Timo Sirainen [Fri, 27 May 2016 19:18:17 +0000 (22:18 +0300)] 
doveadm mailbox delete: Added --unsafe option.

9 years agolib-storage: Added MAILBOX_FLAG_DELETE_UNSAFE
Timo Sirainen [Fri, 27 May 2016 19:15:07 +0000 (22:15 +0300)] 
lib-storage: Added MAILBOX_FLAG_DELETE_UNSAFE

9 years agoconfigure: Include lib-dcrypt in core
Aki Tuomi [Thu, 5 May 2016 21:29:16 +0000 (00:29 +0300)] 
configure: Include lib-dcrypt in core

9 years agolib-dcrypt: Initial implementation
Aki Tuomi [Wed, 27 Apr 2016 11:08:00 +0000 (14:08 +0300)] 
lib-dcrypt: Initial implementation

9 years agodoveadm-director: Fix commands so that they compile
Aki Tuomi [Mon, 30 May 2016 11:45:09 +0000 (14:45 +0300)] 
doveadm-director: Fix commands so that they compile

9 years agodoveadm mailbox delete: Added -e parameter to delete only empty mailboxes.
Timo Sirainen [Fri, 27 May 2016 08:29:09 +0000 (11:29 +0300)] 
doveadm mailbox delete: Added -e parameter to delete only empty mailboxes.

9 years agodoveadm-director: Convert to ver2 infra
Aki Tuomi [Wed, 24 Feb 2016 10:10:19 +0000 (12:10 +0200)] 
doveadm-director: Convert to ver2 infra

9 years agoimap: Implemented support for the LITERAL- capability.
Stephan Bosch [Sun, 29 May 2016 17:14:58 +0000 (19:14 +0200)] 
imap: Implemented support for the LITERAL- capability.

This replaces the LITERAL+ capability when the imap_literal_minus setting is enabled.

9 years agolib-imap: imap-parser: Turned the fatal error flag into a proper error code.
Stephan Bosch [Sun, 29 May 2016 17:23:39 +0000 (19:23 +0200)] 
lib-imap: imap-parser: Turned the fatal error flag into a proper error code.

9 years agolib-imap: imap-parser: Made the fatal result parameter of imap_parser_get_error(...
Stephan Bosch [Sun, 29 May 2016 17:58:55 +0000 (19:58 +0200)] 
lib-imap: imap-parser: Made the fatal result parameter of imap_parser_get_error() optional.

9 years agolib-imap: imap-parser: Renamed error field to error_msg.
Stephan Bosch [Sun, 29 May 2016 17:39:13 +0000 (19:39 +0200)] 
lib-imap: imap-parser: Renamed error field to error_msg.

9 years agodbox: Revert cache changes if some save/copy fails but transaction is committed.
Timo Sirainen [Fri, 27 May 2016 18:55:56 +0000 (21:55 +0300)] 
dbox: Revert cache changes if some save/copy fails but transaction is committed.

9 years agolazy-expunge: Don't fail expunge if mail was already expunged.
Timo Sirainen [Fri, 27 May 2016 18:34:26 +0000 (21:34 +0300)] 
lazy-expunge: Don't fail expunge if mail was already expunged.

9 years agolazy-expunge: Fixed error logging.
Timo Sirainen [Fri, 27 May 2016 18:32:23 +0000 (21:32 +0300)] 
lazy-expunge: Fixed error logging.

9 years agodsync: Debug logging improvement.
Timo Sirainen [Fri, 27 May 2016 15:30:01 +0000 (18:30 +0300)] 
dsync: Debug logging improvement.

9 years agolib-fs: Fix to previous fs-metawrap commit
Timo Sirainen [Fri, 27 May 2016 11:38:17 +0000 (14:38 +0300)] 
lib-fs: Fix to previous fs-metawrap commit

Argh. I was sure I compiled this before pushing it.

9 years agolib-fs: fs-metawrap: Improved error logging on corrupted files.
Timo Sirainen [Fri, 27 May 2016 11:33:47 +0000 (14:33 +0300)] 
lib-fs: fs-metawrap: Improved error logging on corrupted files.

9 years agolib-http: Default port for http should be 80, not 443.
Timo Sirainen [Fri, 27 May 2016 10:33:21 +0000 (13:33 +0300)] 
lib-http: Default port for http should be 80, not 443.

9 years agodoveadm: Fixed sending command -parameters to doveadm-server
Timo Sirainen [Thu, 26 May 2016 16:13:40 +0000 (19:13 +0300)] 
doveadm: Fixed sending command -parameters to doveadm-server

9 years agosdbox: Make sure we don't crash when altmove-flag is set but alt path is missing.
Timo Sirainen [Thu, 26 May 2016 18:40:30 +0000 (21:40 +0300)] 
sdbox: Make sure we don't crash when altmove-flag is set but alt path is missing.

9 years agolib-http: Improved error logging for net_set_*_buffer_size() failures.
Timo Sirainen [Thu, 26 May 2016 15:27:27 +0000 (18:27 +0300)] 
lib-http: Improved error logging for net_set_*_buffer_size() failures.

9 years agodict-sql: Fixed memory leak
Timo Sirainen [Thu, 26 May 2016 15:25:06 +0000 (18:25 +0300)] 
dict-sql: Fixed memory leak

9 years agolib-http: client: Created test program that triggers most possible error conditions.
Stephan Bosch [Sun, 22 May 2016 08:38:18 +0000 (10:38 +0200)] 
lib-http: client: Created test program that triggers most possible error conditions.

9 years agolib-http: test-http-payload: Added tests for the use of nested ioloops.
Stephan Bosch [Tue, 24 May 2016 01:11:07 +0000 (03:11 +0200)] 
lib-http: test-http-payload: Added tests for the use of nested ioloops.

9 years agolib-http: test-http-payload: Added cleanup code to make sure no child processes get...
Stephan Bosch [Mon, 23 May 2016 19:57:18 +0000 (21:57 +0200)] 
lib-http: test-http-payload: Added cleanup code to make sure no child processes get orphaned at failures.

Also handles SIGSEGV and SIGABRT.

9 years agolib-http: test-http-payload: Added -D option to easily enable debug mode.
Stephan Bosch [Sun, 22 May 2016 17:16:42 +0000 (19:16 +0200)] 
lib-http: test-http-payload: Added -D option to easily enable debug mode.

9 years agolib-http: test-http-client: Callback is not called for explicitly aborted requests.
Stephan Bosch [Mon, 23 May 2016 01:16:07 +0000 (03:16 +0200)] 
lib-http: test-http-client: Callback is not called for explicitly aborted requests.

Test request context was not freed in that case.

9 years agolib-http: client: Fixed bug in handling of lost connections while returning from...
Stephan Bosch [Wed, 25 May 2016 21:41:47 +0000 (23:41 +0200)] 
lib-http: client: Fixed bug in handling of lost connections while returning from another ioloop.

At one instance the http_client_connection_is_ready() function could have destroyed the connection while the caller still depended on it.
Renamed the http_client_connection_is_ready() function to http_client_connection_check_ready().
This now returns -1 when the connection got destroyed. Before it returned a bool that just indicated whether the connection was ready or not.
So, there is no need anymore to preserve a connection reference while calling this function.

9 years agolib-http: client: Reworked connection close handling.
Stephan Bosch [Mon, 23 May 2016 00:38:49 +0000 (02:38 +0200)] 
lib-http: client: Reworked connection close handling.

Now, the peer is immediately notified of the lost connection.
Before, this step was only taken when the connection was fully dereferenced.
To prevent recursive notifications between peer and connection, handling the loss of a connection is deferred to the request handler.
When a peer is freed, any associated lingering connections have conn->peer set to NULL.

9 years agolib-http: client: Improved labeling of debug messages.
Stephan Bosch [Mon, 23 May 2016 00:36:10 +0000 (02:36 +0200)] 
lib-http: client: Improved labeling of debug messages.

Request label is corrected.
Labels are now pre-composed and stored.

9 years agolib-http: client: Prevent useless and unexpected request callbacks during http_client...
Stephan Bosch [Sun, 22 May 2016 10:48:37 +0000 (12:48 +0200)] 
lib-http: client: Prevent useless and unexpected request callbacks during http_client_deinit().

Requests are now destroyed before queues, hosts, peers and connections.
As a side-effect, requests are now removed from the client request list at http_client_request_destroy(), so that requests with lingering references will no longer make http_client_wait() hang.

9 years agolib-http: client: Added settings to configure the connection's socket kernel buffer...
Stephan Bosch [Thu, 19 May 2016 22:04:12 +0000 (00:04 +0200)] 
lib-http: client: Added settings to configure the connection's socket kernel buffer sizes.

This is mainly useful for use in the lib-http test suite.

9 years agolib: Implemented net_set_send_buffer_size() and net_set_recv_buffer_size().
Stephan Bosch [Thu, 19 May 2016 22:02:49 +0000 (00:02 +0200)] 
lib: Implemented net_set_send_buffer_size() and net_set_recv_buffer_size().

These functions allow manipulating the kernel socket buffer sizes for a socket file descriptor.

9 years agolib-http: client: Removed curiously duplicated code.
Stephan Bosch [Thu, 19 May 2016 21:42:14 +0000 (23:42 +0200)] 
lib-http: client: Removed curiously duplicated code.

Probably a patch got applied with sufficient fuzz that it duplicated this code fragment, while it actually already existed.

9 years agolib-http: client: peer: Improved debug message that shows the loss of a connection.
Stephan Bosch [Sat, 21 May 2016 11:17:58 +0000 (13:17 +0200)] 
lib-http: client: peer: Improved debug message that shows the loss of a connection.

9 years agolib-http: client: Made peer object reference-counted to prevent invalid memory access...
Stephan Bosch [Fri, 20 May 2016 22:16:21 +0000 (00:16 +0200)] 
lib-http: client: Made peer object reference-counted to prevent invalid memory access in request handling routine.

Resetting the peer->handling_requests flag risked triggering a segfault, since the peer object could be deleted from within the request handler loop.

9 years agolib-http: client: Improved request reference counting in connection code.
Stephan Bosch [Sat, 21 May 2016 11:16:08 +0000 (13:16 +0200)] 
lib-http: client: Improved request reference counting in connection code.

It should now always be clear when the connection object holds a reference to a request and when it is released.
Only while the reference is held, req->conn points to a connection.
This also makes the assertion in http_client_request_unref() more robust and clear.

9 years agolib-http: client: Fixed reference counting for requests that are aborted due to an...
Stephan Bosch [Sun, 22 May 2016 08:42:01 +0000 (10:42 +0200)] 
lib-http: client: Fixed reference counting for requests that are aborted due to an early server response.

An additional http_client_request_unref() is (now) unneccessary.

9 years agolib-http: client: Fixed reference counting for requests that are aborted due to havin...
Stephan Bosch [Thu, 19 May 2016 21:40:26 +0000 (23:40 +0200)] 
lib-http: client: Fixed reference counting for requests that are aborted due to having a broken outgoing payload stream.

9 years agolib-http: Changed http_client_request_error to set request to NULL
Timo Sirainen [Wed, 18 May 2016 16:40:32 +0000 (19:40 +0300)] 
lib-http: Changed http_client_request_error to set request to NULL

It's going to internally unreference it, so the caller should be aware of it
also.

I also changed request state check to be an assert, since I don't think
there's any safe way this could work otherwise.

9 years agolib-http: response parser: Added check for the range of the response status value.
Stephan Bosch [Fri, 20 May 2016 22:16:38 +0000 (00:16 +0200)] 
lib-http: response parser: Added check for the range of the response status value.

A value of 666 was accepted inappropriately.

9 years agocassandra: Added metrics=path connect setting.
Timo Sirainen [Wed, 25 May 2016 19:29:47 +0000 (22:29 +0300)] 
cassandra: Added metrics=path connect setting.

Cassandra's metrics are written to the path in JSON format. It can be a file
or a FIFO. The path supports expanding the standard global %variables, such
as %{pid}

9 years agodict: Added missing main.h from previous commit
Timo Sirainen [Wed, 25 May 2016 19:08:04 +0000 (22:08 +0300)] 
dict: Added missing main.h from previous commit

9 years agodict: Show command statistics in process title.
Timo Sirainen [Wed, 25 May 2016 17:00:01 +0000 (20:00 +0300)] 
dict: Show command statistics in process title.

9 years agolib: Fixed crashes in timing_get_median() and timing_get_95th()
Timo Sirainen [Wed, 25 May 2016 16:56:47 +0000 (19:56 +0300)] 
lib: Fixed crashes in timing_get_median() and timing_get_95th()

These were writing outside allocated memory. They weren't actually used
anywhere yet though.

9 years agolib: Added timing_reset()
Timo Sirainen [Wed, 25 May 2016 16:45:58 +0000 (19:45 +0300)] 
lib: Added timing_reset()

9 years agodsync: race condition where done/finish is received after one side has closed
J. Nick Koston [Fri, 20 May 2016 00:15:49 +0000 (19:15 -0500)] 
dsync: race condition where done/finish is received after one side has closed

We do not tell the remote we are closing if they have
already told us because they close the
connection after sending ITEM_FINISH or ITEM_DONE and will
not be ever receive anything else from us unless
it just happens to get combined into the same packet
as a previous response and is already in the buffer.

9 years agolib-stats: Allow unregistering + re-registering stats.
Timo Sirainen [Tue, 24 May 2016 12:52:37 +0000 (15:52 +0300)] 
lib-stats: Allow unregistering + re-registering stats.

Fixes:
Panic: stats_register() called after stats_alloc_size() was already called - this will break existing allocations

This could have happened with doveadm HTTP API when using multiple commands
in same HTTP connection.

9 years agolib-index: Fixed assert-crash caused by previous cache compression change.
Timo Sirainen [Mon, 23 May 2016 20:24:31 +0000 (23:24 +0300)] 
lib-index: Fixed assert-crash caused by previous cache compression change.

We can't call mail_cache_map() when cache file isn't open or we'll crash:

Panic: file mail-cache.c: line 468 (mail_cache_map): assertion failed: (cache->need_compress_file_seq != 0 || MAIL_INDEX_IS_IN_MEMORY(cache->index))

9 years agolib-index: Make sure cache compression doesn't clear the file unneededly.
Timo Sirainen [Mon, 23 May 2016 15:46:09 +0000 (18:46 +0300)] 
lib-index: Make sure cache compression doesn't clear the file unneededly.

This probably never happened with current code, except when the cache file
was already broken.

mail_cache_compress() unmapped cache when map_with_read==TRUE, but we never
mapped it back. This would cause cache copying code to think cache was
unusable and not copy anything.

9 years agoauth: Support %variable expansion for LDAP field names.
Timo Sirainen [Mon, 23 May 2016 14:47:50 +0000 (17:47 +0300)] 
auth: Support %variable expansion for LDAP field names.

For example this is now allowed:

user_attrs = \
  =namespace/%{ldap:enabledNamespace}/enabled=yes \
  ...

9 years agolib-ldap: Use ldap_unbind_ext() instead of ldap_destroy()
Timo Sirainen [Mon, 23 May 2016 10:12:41 +0000 (13:12 +0300)] 
lib-ldap: Use ldap_unbind_ext() instead of ldap_destroy()

This allows it to compile with older LDAP libraries. Their behavior (at least
in OpenLDAP) is identical as long as LDAP_OPT_CLIENT_CONTROLS haven't been
changed, which we haven't.

9 years agolib-ldap: Support libldap without LDAP_OPT_X_TLS_NEWCTX.
Timo Sirainen [Mon, 23 May 2016 10:08:20 +0000 (13:08 +0300)] 
lib-ldap: Support libldap without LDAP_OPT_X_TLS_NEWCTX.

9 years agodoveadm backup: Fixed unnecessary mailbox deletion.
Timo Sirainen [Fri, 20 May 2016 12:55:52 +0000 (15:55 +0300)] 
doveadm backup: Fixed unnecessary mailbox deletion.

Broken by 79490ec1a. The idea is to delete the mailbox early to avoid
unnecessary work, but we deleted it too early. If the last mail(s) were
deleted instead of just expunging them we deleted the whole mailbox.

9 years agolib: Minor panic message improvement.
Timo Sirainen [Fri, 20 May 2016 10:53:01 +0000 (13:53 +0300)] 
lib: Minor panic message improvement.

9 years agolib-mail: Fixed istream-header-filter calling callback(hdr=NULL)
Timo Sirainen [Thu, 19 May 2016 20:19:29 +0000 (23:19 +0300)] 
lib-mail: Fixed istream-header-filter calling callback(hdr=NULL)

It should do it on the following parsings as well if there were any
callbacks that were called, or if the hdr==NULL callback added any
headers. This is important because the hdr==NULL call could do some
cleanups.

9 years agolib: iostream-temp is a blocking ostream.
Timo Sirainen [Thu, 19 May 2016 12:19:21 +0000 (15:19 +0300)] 
lib: iostream-temp is a blocking ostream.

It goes either to in-memory buffer or to a file.

9 years agoconfig: fix possible out-of-bound access in parsing function
Baofeng Wang [Mon, 16 May 2016 08:34:05 +0000 (11:34 +0300)] 
config: fix possible out-of-bound access in parsing function

Add low-bound check when decreasing string pointer from tail.

9 years agolib-fs: istream-metawrap can now safely have a readable fd
Timo Sirainen [Wed, 18 May 2016 19:38:24 +0000 (22:38 +0300)] 
lib-fs: istream-metawrap can now safely have a readable fd

9 years agolib: Changed istream.abs_start_offset to be relative start_offset
Timo Sirainen [Wed, 18 May 2016 19:36:57 +0000 (22:36 +0300)] 
lib: Changed istream.abs_start_offset to be relative start_offset

i_stream_get_absolute_offset() walks through the stream's parents to get the
absolute offset. This allows streams to change their start_offset after
they have already created (e.g. istream-metawrap).

9 years agodict: Removed duplicate commit reply character
Timo Sirainen [Wed, 18 May 2016 19:59:06 +0000 (22:59 +0300)] 
dict: Removed duplicate commit reply character

This broke dict-client with error:
Invalid commit reply, expected id=1: OO1

9 years agolib: Compiler warning fix
Timo Sirainen [Wed, 18 May 2016 19:51:46 +0000 (22:51 +0300)] 
lib: Compiler warning fix

9 years agolib: Fixed memory leak in ostream-file unit test
Timo Sirainen [Wed, 18 May 2016 19:51:31 +0000 (22:51 +0300)] 
lib: Fixed memory leak in ostream-file unit test

9 years agoMake libbsd optional
Aki Tuomi [Wed, 18 May 2016 13:03:34 +0000 (16:03 +0300)] 
Make libbsd optional

Also use setproctitle properly if libbsd is indeed used.

9 years agolib-fs: istream-metawrap can't have a readable fd currently
Timo Sirainen [Wed, 18 May 2016 19:26:50 +0000 (22:26 +0300)] 
lib-fs: istream-metawrap can't have a readable fd currently