]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
9 years agolib: Add FILE_LOCK_SLOW_WARNING_MSECS environment.
Timo Sirainen [Mon, 24 Oct 2016 11:05:58 +0000 (14:05 +0300)] 
lib: Add FILE_LOCK_SLOW_WARNING_MSECS environment.

Log a warning if any locking takes longer than the specified number of
milliseconds. This can be enabled globally with:

import_environment = $import_environment FILE_LOCK_SLOW_WARNING_MSECS=1000

9 years agolib-index: Fix potential error when reading from uncommitted cache transaction
Timo Sirainen [Mon, 24 Oct 2016 10:28:44 +0000 (13:28 +0300)] 
lib-index: Fix potential error when reading from uncommitted cache transaction

If dovecot.index.cache is compressed during the transaction, the new cache
fields mapping doesn't necessarily match what is in the transaction.

Fixes:
Error: Corrupted index cache file .../dovecot.index.cache: field index too large (27 >= 17)

Although there may be other cache corruption errors it also fixes.

9 years agolib-index: Fix potential assert-crash when reading cache
Timo Sirainen [Mon, 24 Oct 2016 09:25:48 +0000 (12:25 +0300)] 
lib-index: Fix potential assert-crash when reading cache

Fixes:
Panic: file mail-cache-lookup.c: line 258 (mail_cache_lookup_iter_next): assertion failed: (ctx->offset != 0)

Broken by d33fc6c584718efd46159e1d8f46488b9dfc66f5

9 years agomaster: If chrooted service's core wasn't dumped, suggest to unset the chroot.
Timo Sirainen [Mon, 24 Oct 2016 09:23:49 +0000 (12:23 +0300)] 
master: If chrooted service's core wasn't dumped, suggest to unset the chroot.

9 years agolib: Add test for ioloop fd polling
Aki Tuomi [Mon, 24 Oct 2016 08:34:05 +0000 (11:34 +0300)] 
lib: Add test for ioloop fd polling

9 years agolib: Fix kqueue io_loop_get_wait_time usage
Aki Tuomi [Mon, 24 Oct 2016 07:13:42 +0000 (10:13 +0300)] 
lib: Fix kqueue io_loop_get_wait_time usage

The code needs to take into consideration,
when there is no IO to be waited, but possibly
there is io_set_pending used, or just timeouts.

9 years agolib: Ensure tv_r gets set in io_loop_get_wait_time
Aki Tuomi [Mon, 24 Oct 2016 07:08:42 +0000 (10:08 +0300)] 
lib: Ensure tv_r gets set in io_loop_get_wait_time

If this does not get reset here to 0 it can cause
errors or unpredictable behaviour in select/kqueue
polling, such as very long delays.

9 years agodirector: Fix crash handling director_flush_socket when user is freed.
Timo Sirainen [Sat, 22 Oct 2016 19:45:48 +0000 (22:45 +0300)] 
director: Fix crash handling director_flush_socket when user is freed.

9 years agodirector: Support flush socket
Aki Tuomi [Thu, 13 Oct 2016 13:11:48 +0000 (16:11 +0300)] 
director: Support flush socket

This allows specifying an URI to execute
on user kill. It can be of form
exec:/path/to/bin, unix:/path/to/socket or
tcp:ip:port

The location is sent FLUSH username-hash
per killed user. You can execute some
action there, and you are expected to
return '+\nOK\n' as reply once you are
done.

9 years agolib-program-client: Add URI based constructor
Aki Tuomi [Fri, 21 Oct 2016 11:34:51 +0000 (14:34 +0300)] 
lib-program-client: Add URI based constructor

9 years agoconfigure: Improved checking if OpenSSL is too old for lib-dcrypt
Timo Sirainen [Sat, 22 Oct 2016 09:58:40 +0000 (12:58 +0300)] 
configure: Improved checking if OpenSSL is too old for lib-dcrypt

Some OpenSSL versions had EC_KEY_new, but not other needed functions.

9 years agodovecot.m4: Added DOVECOT_BINARY_LDFLAGS for future compatibility
Timo Sirainen [Thu, 20 Oct 2016 19:59:10 +0000 (22:59 +0300)] 
dovecot.m4: Added DOVECOT_BINARY_LDFLAGS for future compatibility

Mainly to keep the serial number the same in v2.2 and v2.3 tree.

9 years agodovecot-config: Added dovecot_statedir
Timo Sirainen [Thu, 20 Oct 2016 11:23:20 +0000 (14:23 +0300)] 
dovecot-config: Added dovecot_statedir

9 years agoMoved cc-wrapper.sh handling to dovecot.m4
Timo Sirainen [Mon, 8 Aug 2016 10:12:15 +0000 (13:12 +0300)] 
Moved cc-wrapper.sh handling to dovecot.m4

When configuring Dovecot --without-shared-libs and pointing external plugins
to uninstalled sources --with-dovecot, any binaries complied for plugins
weren't using cc-wrapper.sh, which could have caused runtime failures when
they attempted to load plugins dynamically. Now it's possible to add
DC_CC_WRAPPER to plugins' configure.ac to build with the cc-wrapper.sh.

9 years agoAdded LIBDOVECOT_PUSH_NOTIFICATION_INCLUDE to dovecot.m4.
Stephan Bosch [Thu, 14 Jul 2016 18:53:46 +0000 (20:53 +0200)] 
Added LIBDOVECOT_PUSH_NOTIFICATION_INCLUDE to dovecot.m4.

9 years agopop3: Fix pop3_logout_format=%{deleted_size} expansion when there are no deletions
Timo Sirainen [Thu, 20 Oct 2016 09:24:44 +0000 (12:24 +0300)] 
pop3: Fix pop3_logout_format=%{deleted_size} expansion when there are no deletions

Should be "0", not empty string.

9 years ago%{auth_domain} shouldn't include the leading '@'
Timo Sirainen [Thu, 20 Oct 2016 09:06:25 +0000 (12:06 +0300)] 
%{auth_domain} shouldn't include the leading '@'

9 years agolib-ldap: Fixed compiling with OpenBSD
Timo Sirainen [Thu, 20 Oct 2016 15:31:27 +0000 (18:31 +0300)] 
lib-ldap: Fixed compiling with OpenBSD

9 years agoauth: Escape local_name
Aki Tuomi [Thu, 20 Oct 2016 13:30:49 +0000 (16:30 +0300)] 
auth: Escape local_name

9 years agologin-common: Include local_name in login_var_expand_table
Aki Tuomi [Thu, 20 Oct 2016 13:06:27 +0000 (16:06 +0300)] 
login-common: Include local_name in login_var_expand_table

This way it can be used in login_log_format

9 years agolib-program-client: Fixed boolean expressions.
Stephan Bosch [Thu, 20 Oct 2016 13:46:01 +0000 (15:46 +0200)] 
lib-program-client: Fixed boolean expressions.

Problems found with clang -Wstrict-bool.

9 years agoauth: Fixed assert-crash on invalid auth-client input
Timo Sirainen [Thu, 20 Oct 2016 13:30:58 +0000 (16:30 +0300)] 
auth: Fixed assert-crash on invalid auth-client input

For example if client sends invalid input like:
auth: Error: BUG: Authentication client sent unknown command: XYZ

Fixes crash:
auth: Panic: key not found from hash

9 years agoAdded "doveadm process status"
Timo Sirainen [Thu, 20 Oct 2016 10:30:36 +0000 (13:30 +0300)] 
Added "doveadm process status"

This allows asking for processes' current status in master process.

9 years agoAdded "doveadm service status"
Timo Sirainen [Thu, 20 Oct 2016 10:12:34 +0000 (13:12 +0300)] 
Added "doveadm service status"

This allows asking for services' current status in master process.

9 years agodoveadm-master: Code cleanup - simplify sending command args to master.
Timo Sirainen [Thu, 20 Oct 2016 10:22:47 +0000 (13:22 +0300)] 
doveadm-master: Code cleanup - simplify sending command args to master.

This also escapes the parameters to make sure nothing bad can be sent.

9 years agodoveadm service stop: Convert to doveadm v2 API
Timo Sirainen [Thu, 20 Oct 2016 10:11:19 +0000 (13:11 +0300)] 
doveadm service stop: Convert to doveadm v2 API

9 years agodoveadm service stop: Code cleanup - Prepare for other service commands.
Timo Sirainen [Thu, 20 Oct 2016 10:10:56 +0000 (13:10 +0300)] 
doveadm service stop: Code cleanup - Prepare for other service commands.

9 years agodoveadm service stop: Moved command handling to doveadm-master.c
Timo Sirainen [Thu, 20 Oct 2016 10:09:09 +0000 (13:09 +0300)] 
doveadm service stop: Moved command handling to doveadm-master.c

It's talking to master process, and there will be other non-service commands
that talk to the master process in the same way.

9 years agodoveadm user: If lookup fails, don't write it to the same line as header.
Timo Sirainen [Tue, 11 Oct 2016 09:43:20 +0000 (12:43 +0300)] 
doveadm user: If lookup fails, don't write it to the same line as header.

9 years agodoveadm-server: Show incoming connection's IP and running command is process title.
Timo Sirainen [Wed, 19 Oct 2016 18:49:30 +0000 (21:49 +0300)] 
doveadm-server: Show incoming connection's IP and running command is process title.

9 years agoauth: Pass local_name to auth-request
Aki Tuomi [Mon, 17 Oct 2016 21:37:32 +0000 (00:37 +0300)] 
auth: Pass local_name to auth-request

This allows using local_name in various places,
such as passdb/userdb queries.

9 years agologin proxy: Hanging outgoing SSL connections caused using already-freed memory
Timo Sirainen [Thu, 20 Oct 2016 07:11:53 +0000 (10:11 +0300)] 
login proxy: Hanging outgoing SSL connections caused using already-freed memory

This mainly happened when login proxy closed the connection due to connect
timeout. The ssl-proxy still had a reference and existed for a longer time.
If SSL handshake still succeeded afterwards, it now called
login_proxy_ssl_handshaked(), which accessed the already-freed proxy and
likely crashed.

Fixed the ssl-client proxy code specifically. Alternatively ssl_proxy_free()
could be calling ssl_proxy_destroy() always, but since ssl-server side of
the code seems to have been working fine, I don't want to accidentally
break it.

9 years agov2.2.26.rc1 released.
Timo Sirainen [Wed, 19 Oct 2016 16:02:51 +0000 (19:02 +0300)] 
v2.2.26.rc1 released.

9 years agolib-program-client: Correctly handle error code
Aki Tuomi [Wed, 19 Oct 2016 18:03:24 +0000 (21:03 +0300)] 
lib-program-client: Correctly handle error code

9 years agolib: Copy target_uid from restrict_access_settings
Aki Tuomi [Wed, 19 Oct 2016 17:40:22 +0000 (20:40 +0300)] 
lib: Copy target_uid from restrict_access_settings

One cannot assign to set->uid, causing compile error.

9 years agolib-program-client: Try drop setuid root by default
Aki Tuomi [Wed, 19 Oct 2016 16:02:22 +0000 (19:02 +0300)] 
lib-program-client: Try drop setuid root by default

But not if root privileges are asked for.

9 years agolib: Add drop_setuid_root for restrict_access
Aki Tuomi [Wed, 19 Oct 2016 15:44:35 +0000 (18:44 +0300)] 
lib: Add drop_setuid_root for restrict_access

drop_setuid_root, when set to true, will detect
and try to drop getuid()==0. This is done by
recovering current effective UID to set->uid
if set->uid == -1, and then doing seteuid(0).
It will also drop out any other extra privileges,
such as extra groups not requested for.

9 years agolib-storage: clean up mailbox_list_create to improve readability
Josef 'Jeff' Sipek [Wed, 12 Oct 2016 18:57:51 +0000 (14:57 -0400)] 
lib-storage: clean up mailbox_list_create to improve readability

There is no reason to use mailbox_list_driver_find() here instead of
mailbox_list_find_class() as (1) we do not need the index into the list
driver array, and (2) dealing with double-pointers is harder than regular
pointers.

9 years ago.gitignore: Updated to include auto-added m4/*
Timo Sirainen [Fri, 22 Apr 2016 19:44:01 +0000 (22:44 +0300)] 
.gitignore: Updated to include auto-added m4/*

9 years agopush-notification: Error handling fix and cleanups.
Timo Sirainen [Wed, 19 Oct 2016 16:41:51 +0000 (19:41 +0300)] 
push-notification: Error handling fix and cleanups.

9 years agodovecot-ldap.conf.ext: Updated sasl_bind comment.
Timo Sirainen [Wed, 19 Oct 2016 15:25:15 +0000 (18:25 +0300)] 
dovecot-ldap.conf.ext: Updated sasl_bind comment.

9 years agolib-program-client: Fix memory access problem
Aki Tuomi [Wed, 19 Oct 2016 13:31:01 +0000 (16:31 +0300)] 
lib-program-client: Fix memory access problem

9 years agolib-program-client: Backport test-program-client-unix
Aki Tuomi [Wed, 19 Oct 2016 13:24:56 +0000 (16:24 +0300)] 
lib-program-client: Backport test-program-client-unix

9 years agolib-program-client: Fix local tests
Aki Tuomi [Wed, 19 Oct 2016 13:06:22 +0000 (16:06 +0300)] 
lib-program-client: Fix local tests

9 years agolib-program-client: Disable valgrind
Aki Tuomi [Mon, 17 Oct 2016 11:19:40 +0000 (14:19 +0300)] 
lib-program-client: Disable valgrind

For local test, we can't use valgrind,
it's too unreliable (breaks execution sometimes).

9 years agolib-program-client: Move version string to define
Aki Tuomi [Mon, 17 Oct 2016 06:46:22 +0000 (09:46 +0300)] 
lib-program-client: Move version string to define

9 years agolib-program-client: Add switch_ioloop vfunc
Aki Tuomi [Mon, 17 Oct 2016 06:35:14 +0000 (09:35 +0300)] 
lib-program-client: Add switch_ioloop vfunc

This lets program-client backends do their own
special io loop switching.

9 years agolib-program-client: Use milliseconds in idle timeout
Aki Tuomi [Sat, 15 Oct 2016 10:59:45 +0000 (13:59 +0300)] 
lib-program-client: Use milliseconds in idle timeout

9 years agolib-program-client: Use child-wait
Aki Tuomi [Mon, 17 Oct 2016 06:09:23 +0000 (09:09 +0300)] 
lib-program-client: Use child-wait

This makes the client waiting asynchronous.

9 years agolib-program-client: Disconnect asynchronously
Aki Tuomi [Mon, 17 Oct 2016 06:11:38 +0000 (09:11 +0300)] 
lib-program-client: Disconnect asynchronously

9 years agolib-program-client: Use restrict-access
Aki Tuomi [Wed, 12 Oct 2016 10:14:03 +0000 (13:14 +0300)] 
lib-program-client: Use restrict-access

This makes the program-client execution behave
more consistent to the rest of the core code.

9 years agolib: Add reference counting to child_wait_pid
Aki Tuomi [Thu, 13 Oct 2016 07:11:52 +0000 (10:11 +0300)] 
lib: Add reference counting to child_wait_pid

9 years agolib-storage: Make sure mailbox_uidvalidity_next() doesn't return 0.
Timo Sirainen [Mon, 17 Oct 2016 09:34:36 +0000 (12:34 +0300)] 
lib-storage: Make sure mailbox_uidvalidity_next() doesn't return 0.

0 isn't a valid IMAP UIDVALIDITY, and Dovecot treats 0 as "not assigned".

9 years agolib-dcrypt: add a test for password change
Martti Rannanjärvi [Mon, 17 Oct 2016 18:03:51 +0000 (21:03 +0300)] 
lib-dcrypt: add a test for password change

Test that you can encrypt a key with password, encrypt a key with the
password protected key, change the password, and still load a key that you
encrypted with the key encrypted using the first password.

9 years agodoveadm: trim doveadm dump dcrypt-key input
Martti Rannanjärvi [Tue, 18 Oct 2016 11:57:31 +0000 (14:57 +0300)] 
doveadm: trim doveadm dump dcrypt-key input

dcrypt does not like extra newlines at the end of a key.

9 years agopush-notification: Resolve indentation problem
Steffen Templin [Mon, 17 Oct 2016 07:34:04 +0000 (09:34 +0200)] 
push-notification: Resolve indentation problem

9 years agopush-notification: Re-open mailbox and sync it to get unseen count.
Steffen Templin [Thu, 6 Oct 2016 07:35:17 +0000 (07:35 +0000)] 
push-notification: Re-open mailbox and sync it to get unseen count.

9 years agopush-notification: Add unseen count to OX driver.
Steffen Templin [Wed, 5 Oct 2016 10:28:49 +0000 (13:28 +0300)] 
push-notification: Add unseen count to OX driver.

9 years agoglobal: Handle broken Content-Type headers consistently.
Timo Sirainen [Mon, 10 Oct 2016 17:38:31 +0000 (20:38 +0300)] 
global: Handle broken Content-Type headers consistently.

1) Only the first Content-Type header is used. (Simpler than using the last.)

2) Invalid Content-Types are parsed as far as we can. This is mainly to make
sure they aren't treated as missing Content-Types, which could cause them to
become text/plain.

9 years agolib-imap: imap_bodystructure_parse() ignores text/plain flag mismatch for now.
Timo Sirainen [Mon, 10 Oct 2016 17:24:41 +0000 (20:24 +0300)] 
lib-imap: imap_bodystructure_parse() ignores text/plain flag mismatch for now.

Maybe we can enable it some day far into the future, but for now this just
causes unnecessary cache file rebuilds.

9 years agolib-imap: Don't write a broken Content-Type as text/plain to BODYSTRUCTURE
Timo Sirainen [Mon, 10 Oct 2016 17:23:47 +0000 (20:23 +0300)] 
lib-imap: Don't write a broken Content-Type as text/plain to BODYSTRUCTURE

Mainly because it doesn't match with MESSAGE_PART_FLAG_TEXT in message_part.

9 years agoconfig: Compare local_name case insensitive
Aki Tuomi [Sat, 15 Oct 2016 20:04:35 +0000 (23:04 +0300)] 
config: Compare local_name case insensitive

DNS and certificate names should be compared
case insensitive.

9 years agolib: Add null_strcasecmp
Aki Tuomi [Mon, 17 Oct 2016 20:25:27 +0000 (23:25 +0300)] 
lib: Add null_strcasecmp

9 years agoauth-policy: Use request's pool instead of new pool
Aki Tuomi [Mon, 17 Oct 2016 16:38:07 +0000 (19:38 +0300)] 
auth-policy: Use request's pool instead of new pool

This fixes existing memory leak in auth_report,
which is caused by using separate memory pool
instead of request's pool.

Thank you for Andrea Carpani for extensive
debugging.

9 years agodict-sql: Use LIMIT in SQL queries with dict_iterate_set_limit()
Timo Sirainen [Sun, 16 Oct 2016 19:58:07 +0000 (22:58 +0300)] 
dict-sql: Use LIMIT in SQL queries with dict_iterate_set_limit()

9 years agolib-dict: Added dict_iterate_set_limit()
Timo Sirainen [Sun, 16 Oct 2016 19:40:18 +0000 (22:40 +0300)] 
lib-dict: Added dict_iterate_set_limit()

9 years agolib-dict: Duplicate result value in mempool
Aki Tuomi [Mon, 17 Oct 2016 16:21:34 +0000 (19:21 +0300)] 
lib-dict: Duplicate result value in mempool

Duplicate the result value already in callback
to avoid it getting lost during async calls.

Reported & tested by Pierre Jaury.

9 years agolib-fs: Fixed fs_metadata_find() to actually work
Timo Sirainen [Tue, 18 Oct 2016 07:45:05 +0000 (10:45 +0300)] 
lib-fs: Fixed fs_metadata_find() to actually work

9 years agolib-mail: Fixed infinite loop in istream-attachment-extractor
Timo Sirainen [Mon, 17 Oct 2016 20:06:48 +0000 (23:06 +0300)] 
lib-mail: Fixed infinite loop in istream-attachment-extractor

Broken by 7f74811b7. Pretty much any larger attachment going through
this istream had a good potential of going into an infinite loop.

9 years agolib-fs: Added FS_METADATA_WRITE_FNAME to allow renaming a file being written.
Timo Sirainen [Mon, 17 Oct 2016 07:59:34 +0000 (10:59 +0300)] 
lib-fs: Added FS_METADATA_WRITE_FNAME to allow renaming a file being written.

9 years agolib-fs: Added internal fs_metadata_find() helper function
Timo Sirainen [Mon, 10 Oct 2016 22:04:39 +0000 (01:04 +0300)] 
lib-fs: Added internal fs_metadata_find() helper function

9 years agolib-fs: Optimize changing FS_METADATA_INTERNAL_PREFIX metadata.
Timo Sirainen [Mon, 10 Oct 2016 21:46:59 +0000 (00:46 +0300)] 
lib-fs: Optimize changing FS_METADATA_INTERNAL_PREFIX metadata.

file->metadata_changed doesn't need to change in that situation. It's used
by fs-metawrap to find out if it needs to rewrite metadata during a write,
but internal metadata isn't written to its header.

9 years agosdbox: Removed duplicated code.
Timo Sirainen [Mon, 17 Oct 2016 09:41:33 +0000 (12:41 +0300)] 
sdbox: Removed duplicated code.

9 years agolib-dcrypt: change unit test ec curve to secp521r1
Martti Rannanjärvi [Mon, 17 Oct 2016 07:36:17 +0000 (10:36 +0300)] 
lib-dcrypt: change unit test ec curve to secp521r1

This curve is more common, so unit tests will pass on more machines.

9 years agolib-fs: Lazily initialize timings to save memory.
Timo Sirainen [Mon, 17 Oct 2016 06:13:39 +0000 (09:13 +0300)] 
lib-fs: Lazily initialize timings to save memory.

9 years agolib-storage: Use MAILDIR_INFO_SEP_S
Aki Tuomi [Fri, 14 Oct 2016 14:13:23 +0000 (17:13 +0300)] 
lib-storage: Use MAILDIR_INFO_SEP_S

Replace hardcoded : with MAILDIR_INFO_SEP_S

9 years agolib-dcrypt: Fix uninitialized memory
Aki Tuomi [Fri, 14 Oct 2016 12:28:32 +0000 (15:28 +0300)] 
lib-dcrypt: Fix uninitialized memory

9 years agolib-dcrypt: str_new to t_str_new in some test-crypto tests
Martti Rannanjärvi [Fri, 14 Oct 2016 10:48:41 +0000 (13:48 +0300)] 
lib-dcrypt: str_new to t_str_new in some test-crypto tests

str_new from default_pool was not properly freed.

9 years agolib-dcrypt: enc_key and pw must be NULL on storing unencrypted private key
Martti Rannanjärvi [Thu, 13 Oct 2016 20:38:36 +0000 (23:38 +0300)] 
lib-dcrypt: enc_key and pw must be NULL on storing unencrypted private key

Add tests for password and key encryption, and get_info on them. Also
give examples of valid cipher values for password and key encryption in
dcrypt.h comment.

9 years agolib-dcrypt: fix comment of dovecot format v2 to use colon
Martti Rannanjärvi [Wed, 12 Oct 2016 18:29:51 +0000 (21:29 +0300)] 
lib-dcrypt: fix comment of dovecot format v2 to use colon

Version 2 field separator was changed to colon.

9 years agoauth: Compiler warning fix
Timo Sirainen [Mon, 10 Oct 2016 17:35:17 +0000 (20:35 +0300)] 
auth: Compiler warning fix

9 years agolib: uri-util: Always fully check the syntax of percent encoding while parsing URI...
Stephan Bosch [Sun, 2 Oct 2016 12:14:48 +0000 (14:14 +0200)] 
lib: uri-util: Always fully check the syntax of percent encoding while parsing URI components.

9 years agouri-util: Added public function for parsing single percent encoding instances.
Stephan Bosch [Sun, 8 May 2016 20:56:59 +0000 (22:56 +0200)] 
uri-util: Added public function for parsing single percent encoding instances.

9 years agouri-util: Fixed assertion failure for invalid character in path segment.
Stephan Bosch [Sat, 20 Feb 2016 17:47:58 +0000 (19:47 +0200)] 
uri-util: Fixed assertion failure for invalid character in path segment.

9 years agolib-index: unlink_directory has no error
Aki Tuomi [Fri, 14 Oct 2016 06:49:16 +0000 (09:49 +0300)] 
lib-index: unlink_directory has no error

9 years agoimap-hibernate: Adjust API usage for ostream
Aki Tuomi [Fri, 14 Oct 2016 06:48:43 +0000 (09:48 +0300)] 
imap-hibernate: Adjust API usage for ostream

9 years agoRevert "uri-util: Fixed assertion failure for invalid character in path segment."
Aki Tuomi [Fri, 14 Oct 2016 06:45:11 +0000 (09:45 +0300)] 
Revert "uri-util: Fixed assertion failure for invalid character in path segment."

This reverts commit dbbdcc1224f81a40e746a09e6d44af7c4f24ff71.

9 years agoRevert "lib: uri-util: Always fully check the syntax of percent encoding while parsin...
Aki Tuomi [Fri, 14 Oct 2016 06:45:09 +0000 (09:45 +0300)] 
Revert "lib: uri-util: Always fully check the syntax of percent encoding while parsing URI components."

This reverts commit 5b6dc4c53617362baf8713815621bebbeb38c8cc.

9 years agolib: Don't set ostream buffer as blocking
Timo Sirainen [Wed, 18 May 2016 14:45:09 +0000 (17:45 +0300)] 
lib: Don't set ostream buffer as blocking

9 years agolib: Added ostream.blocking boolean
Timo Sirainen [Mon, 16 May 2016 16:33:40 +0000 (19:33 +0300)] 
lib: Added ostream.blocking boolean

Similar to istream.blocking.

9 years agolib: ostream-file: Allow creating derived file output streams.
Stephan Bosch [Sat, 30 Apr 2016 12:10:59 +0000 (14:10 +0200)] 
lib: ostream-file: Allow creating derived file output streams.

9 years agolib: ostream-file: Split o_stream_file_writev() from o_stream_file_writev_full().
Stephan Bosch [Sat, 30 Apr 2016 11:55:52 +0000 (13:55 +0200)] 
lib: ostream-file: Split o_stream_file_writev() from o_stream_file_writev_full().

9 years agolib: ostream-file: Renamed o_stream_writev() to o_stream_file_writev_full().
Stephan Bosch [Sat, 30 Apr 2016 11:51:59 +0000 (13:51 +0200)] 
lib: ostream-file: Renamed o_stream_writev() to o_stream_file_writev_full().

9 years agolib: ostream-file: Renamed iov_size to iov_count everywhere and made it unsigned...
Stephan Bosch [Sat, 30 Apr 2016 11:29:47 +0000 (13:29 +0200)] 
lib: ostream-file: Renamed iov_size to iov_count everywhere and made it unsigned int for consistency.

9 years agoauth: Pass userdb fields to worker
Aki Tuomi [Wed, 12 Oct 2016 09:04:10 +0000 (12:04 +0300)] 
auth: Pass userdb fields to worker

If this is not done, then those userdb handlers
that need access to userdb variables for e.g.
interpolation, cannot access them.

9 years agoauth: Don't re-insert userdb results from auth cache data back to cache.
Timo Sirainen [Tue, 11 Oct 2016 10:18:53 +0000 (13:18 +0300)] 
auth: Don't re-insert userdb results from auth cache data back to cache.

This was also breaking TTLs for the cached userdb results, because each
re-insert reset the TTL.

9 years agolib-program-client: Fixed potential panic in test-program-client-local
Timo Sirainen [Mon, 10 Oct 2016 18:22:15 +0000 (21:22 +0300)] 
lib-program-client: Fixed potential panic in test-program-client-local

If the run finished before io_loop_run(), it would panic with:
Panic: BUG: No IOs or timeouts set. Not waiting for infinity.

9 years agolib-program-client: Fixed program_client_run() that succeeds rapidly.
Timo Sirainen [Mon, 10 Oct 2016 18:19:34 +0000 (21:19 +0300)] 
lib-program-client: Fixed program_client_run() that succeeds rapidly.

program_client_run_async() could have called the callback with result=0
before io_loop_run(). This happened with local client.

Fixes in test-program-client-local:
Panic: BUG: No IOs or timeouts set. Not waiting for infinity.

9 years agofs-metawrap: Don't assert-crash when trying to write an empty file.
Timo Sirainen [Mon, 10 Oct 2016 20:53:55 +0000 (23:53 +0300)] 
fs-metawrap: Don't assert-crash when trying to write an empty file.

Fixes:
Panic: file fs-metawrap.c: line 401 (fs_metawrap_write_stream_finish): assertion failed: (file->super_output->offset > 0 || file->super_output->stream_errno != 0)

9 years agolib-fs: Renamed internal i_stream_mail_read() to i_stream_fs_stats_read()
Timo Sirainen [Mon, 10 Oct 2016 21:31:17 +0000 (00:31 +0300)] 
lib-fs: Renamed internal i_stream_mail_read() to i_stream_fs_stats_read()

Just to make backtraces look clearer. Originally forgot to change this
after copy&pasting code from istream-mail.c