]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
7 years agodns: Fix duration field in dns_worker_request_finished event
Timo Sirainen [Wed, 29 Aug 2018 17:43:22 +0000 (20:43 +0300)] 
dns: Fix duration field in dns_worker_request_finished event

7 years agolib: connection - Clarify logging of incoming connections
Timo Sirainen [Mon, 27 Aug 2018 07:35:47 +0000 (10:35 +0300)] 
lib: connection - Clarify logging of incoming connections

Don't log "Client connected" for both incoming and outgoing connections.

7 years agolib: connection - Remove dead code
Timo Sirainen [Mon, 27 Aug 2018 07:33:54 +0000 (10:33 +0300)] 
lib: connection - Remove dead code

connection_client_connected() can only be called for clients. There was
already an assert for it.

7 years agodns: Remove duplicate event_unref() in dns_client_input_args()
Martti Rannanjärvi [Wed, 29 Aug 2018 14:27:58 +0000 (17:27 +0300)] 
dns: Remove duplicate event_unref() in dns_client_input_args()

The event is unreffed at the end of the function also.

7 years agodns: Return the lookup error string to the querier
Martti Rannanjärvi [Wed, 29 Aug 2018 14:22:22 +0000 (17:22 +0300)] 
dns: Return the lookup error string to the querier

7 years agolib-dns: Set error_r in dns_client_connect() on failure
Martti Rannanjärvi [Wed, 29 Aug 2018 10:40:33 +0000 (13:40 +0300)] 
lib-dns: Set error_r in dns_client_connect() on failure

7 years agolib-dns: Remove DNS from the log messages now that it's in the prefix
Martti Rannanjärvi [Wed, 29 Aug 2018 10:23:55 +0000 (13:23 +0300)] 
lib-dns: Remove DNS from the log messages now that it's in the prefix

7 years agolib-dns: Use dns(host): prefix instead of just host: in event
Martti Rannanjärvi [Wed, 29 Aug 2018 10:21:23 +0000 (13:21 +0300)] 
lib-dns: Use dns(host): prefix instead of just host: in event

7 years agolib: Use basename of unix socket path as event log prefix
Martti Rannanjärvi [Wed, 29 Aug 2018 08:04:10 +0000 (11:04 +0300)] 
lib: Use basename of unix socket path as event log prefix

This is to make the prefix consistent with other unix socket loggings in
Dovecot.

7 years agolib-smtp: client: Fix potential segfault occurring after receiving RCPT reply.
Stephan Bosch [Sun, 26 Aug 2018 13:16:17 +0000 (15:16 +0200)] 
lib-smtp: client: Fix potential segfault occurring after receiving RCPT reply.

Could occur when RCPT reply is received befor DATA command is sent in LMTP session.

Problem found by Coverity.

7 years agolib-dns - struct member cleanup in dns_lookup
Phil Carmody [Wed, 29 Aug 2018 12:15:30 +0000 (15:15 +0300)] 
lib-dns - struct member cleanup in dns_lookup

The index was never used anyway. Now we're using an alloconly pool,
there's no need for the dns_lookup to keep a freeable pointer to the
fields also int result.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
7 years agoquota: Mark noenforcing quotas with unlimited quota
Aki Tuomi [Tue, 24 Jul 2018 11:47:47 +0000 (14:47 +0300)] 
quota: Mark noenforcing quotas with unlimited quota

This allows quota to be properly updated for unenforced quotas
so they can be used for tracking only.

This fixes issue where using noenforcing would not update quota
during mail save, but requires a manual quota update.

7 years agoquota: Cleanup - Move enforce checking out of quota_root_visible()
Aki Tuomi [Tue, 24 Jul 2018 11:38:18 +0000 (14:38 +0300)] 
quota: Cleanup - Move enforce checking out of quota_root_visible()

Non-enforcing quota roots need to be visible even when enforcing quotas,
otherwise we cannot update them.

7 years agolib: Use i_asserts() for NULL-checks in test_event_filter_inc_int()
Martti Rannanjärvi [Tue, 28 Aug 2018 09:00:54 +0000 (12:00 +0300)] 
lib: Use i_asserts() for NULL-checks in test_event_filter_inc_int()

This is so scan-build doesn't explore the assertations not holding and
create noise with that.

7 years agofts: Optimize replacing NULs in header
Timo Sirainen [Mon, 27 Aug 2018 12:06:44 +0000 (15:06 +0300)] 
fts: Optimize replacing NULs in header

7 years agofts: Fix indexing mails with NULs in headers
Timo Sirainen [Thu, 23 Aug 2018 11:33:59 +0000 (14:33 +0300)] 
fts: Fix indexing mails with NULs in headers

After the first NUL all the rest of the string was converted to spaces.
This was broken already in the initial commit that attempted to fix this:
4d27f95c76bd008bb38f9c442567046da2b6ce14

7 years agolib-http: test-http-client-errors - Skip VERSION line in DNS reply
Aki Tuomi [Tue, 28 Aug 2018 06:45:58 +0000 (09:45 +0300)] 
lib-http: test-http-client-errors - Skip VERSION line in DNS reply

Otherwise we send extraneous results causing SIGPIPE crash.

Broken in ddb9ead03f4cc7a2c61094e50803e07dfd590cb5

7 years agolib-dns: Always use dns_lookup_free
Aki Tuomi [Mon, 27 Aug 2018 11:16:46 +0000 (14:16 +0300)] 
lib-dns: Always use dns_lookup_free

Ensures that all resources get free'd in single place,
Fixes memory leak and event double-unref.

Broken in 9ee82e3f660e6e072532283cad8668a578ac137d

7 years agolib-dns: Always allocate lookup
Aki Tuomi [Mon, 27 Aug 2018 11:15:54 +0000 (14:15 +0300)] 
lib-dns: Always allocate lookup

Simplifies next change

7 years agolib-dns: Use pooled memory with dns lookups
Aki Tuomi [Mon, 27 Aug 2018 11:14:50 +0000 (14:14 +0300)] 
lib-dns: Use pooled memory with dns lookups

Simplifies memory management

7 years agolib: Add test for event_inc_int()
Martti Rannanjärvi [Mon, 27 Aug 2018 11:36:33 +0000 (14:36 +0300)] 
lib: Add test for event_inc_int()

7 years agosubmission: Reorder initialization code
Aki Tuomi [Thu, 23 Aug 2018 17:29:58 +0000 (20:29 +0300)] 
submission: Reorder initialization code

login_set socket paths get invalidated when
master_service_init_finish is called, so we need
to run the code that uses them before this.

7 years agolib-smtp: Increase memory pool initial sizes
Aki Tuomi [Thu, 23 Aug 2018 16:15:50 +0000 (19:15 +0300)] 
lib-smtp: Increase memory pool initial sizes

This reduces malloc traffic

7 years agolib-dns: Remove useless code
Aki Tuomi [Fri, 24 Aug 2018 08:42:56 +0000 (11:42 +0300)] 
lib-dns: Remove useless code

Found by scan-build

7 years agolib-http: Hook lib-http event to connection event
Aki Tuomi [Fri, 17 Aug 2018 11:27:52 +0000 (14:27 +0300)] 
lib-http: Hook lib-http event to connection event

7 years agodns, lib-dns: Move to protocol v1.0
Aki Tuomi [Fri, 17 Aug 2018 08:33:18 +0000 (11:33 +0300)] 
dns, lib-dns: Move to protocol v1.0

7 years agodns: Add event support
Aki Tuomi [Tue, 31 Jul 2018 09:51:54 +0000 (12:51 +0300)] 
dns: Add event support

7 years agodns: Use connection.c
Aki Tuomi [Thu, 16 Aug 2018 07:32:38 +0000 (10:32 +0300)] 
dns: Use connection.c

This enables processing multiple requests at a time.

7 years agolib: connection - Add and fix logging
Aki Tuomi [Thu, 2 Aug 2018 14:22:51 +0000 (17:22 +0300)] 
lib: connection - Add and fix logging

7 years agolib: connection - Add event support
Aki Tuomi [Thu, 2 Aug 2018 14:22:37 +0000 (17:22 +0300)] 
lib: connection - Add event support

7 years agolib-dns: Add event support
Aki Tuomi [Tue, 31 Jul 2018 09:52:19 +0000 (12:52 +0300)] 
lib-dns: Add event support

7 years agolib-dns: Move calling callback to separate function
Aki Tuomi [Tue, 31 Jul 2018 09:45:17 +0000 (12:45 +0300)] 
lib-dns: Move calling callback to separate function

Simplifies next commit

7 years agolib-dns: Initialize lookup earlier
Aki Tuomi [Fri, 17 Aug 2018 11:36:13 +0000 (14:36 +0300)] 
lib-dns: Initialize lookup earlier

7 years agolib-dns: Compose final command in dns_client_lookup_common
Aki Tuomi [Fri, 17 Aug 2018 07:55:39 +0000 (10:55 +0300)] 
lib-dns: Compose final command in dns_client_lookup_common

Makes logging easier

7 years agolib-dns: Use connection with dns-client
Aki Tuomi [Thu, 16 Aug 2018 12:24:30 +0000 (15:24 +0300)] 
lib-dns: Use connection with dns-client

7 years agolib: lib-event - Add inc_int to passthrough events
Aki Tuomi [Fri, 17 Aug 2018 07:39:05 +0000 (10:39 +0300)] 
lib: lib-event - Add inc_int to passthrough events

Was forgotten in 12927b843387b2a93fcf1d2e05df7c79af06e567

7 years agolib: Make io_loop_move_*(NULL) no-op
Aki Tuomi [Thu, 23 Aug 2018 11:58:44 +0000 (14:58 +0300)] 
lib: Make io_loop_move_*(NULL) no-op

7 years agolib: Mark signal waiting IO as "never wait alone"
Timo Sirainen [Fri, 17 Aug 2018 08:34:02 +0000 (11:34 +0300)] 
lib: Mark signal waiting IO as "never wait alone"

This signal is being automatically moved to nested ioloops. It can't be the
only IO being waited, since there's no code that simply wants to wait for a
signal.

7 years agolib: ioloop-epoll/kqueue: Remove now unnecessary infinite wait check.
Timo Sirainen [Fri, 17 Aug 2018 08:33:17 +0000 (11:33 +0300)] 
lib: ioloop-epoll/kqueue: Remove now unnecessary infinite wait check.

The previous change adds this globally to io_loop_run_get_wait_time().

7 years agolib: Add io_set_never_wait_alone()
Timo Sirainen [Fri, 17 Aug 2018 08:32:10 +0000 (11:32 +0300)] 
lib: Add io_set_never_wait_alone()

If ioloop is run without any timeouts and without IOs that don't have this
flag, assert-crash rather than going to infinite wait.

7 years agolib: Add and use io_loop_run_get_wait_time()
Timo Sirainen [Fri, 17 Aug 2018 08:29:30 +0000 (11:29 +0300)] 
lib: Add and use io_loop_run_get_wait_time()

This is going to be called just before running an ioloop iteration.
The next commit improves its behavior.

7 years agolib-smtp: test-smtp-client-errors: Add tests for transaction timeouts.
Stephan Bosch [Wed, 15 Aug 2018 20:34:19 +0000 (22:34 +0200)] 
lib-smtp: test-smtp-client-errors: Add tests for transaction timeouts.

7 years agolib-smtp: client: Add debug message for the moment when all RCPT replies are received.
Stephan Bosch [Wed, 15 Aug 2018 22:50:12 +0000 (00:50 +0200)] 
lib-smtp: client: Add debug message for the moment when all RCPT replies are received.

This helps in debugging transaction state transition problems.

7 years agolib-smtp: client: Fix transaction state transition for the DATA command.
Stephan Bosch [Wed, 15 Aug 2018 22:42:50 +0000 (00:42 +0200)] 
lib-smtp: client: Fix transaction state transition for the DATA command.

It progressed to the DATA state too early. By the looks of things, this only
affected the correctness of error and debug messages. It does not affect the
transaction itself.

7 years agolib-smtp: client: Fix segmentation fault occurring at transaction timeout.
Stephan Bosch [Wed, 15 Aug 2018 22:28:51 +0000 (00:28 +0200)] 
lib-smtp: client: Fix segmentation fault occurring at transaction timeout.

In the DATA command callback trans->cmd_data can be NULL when the command is
aborted from smtp_client_transaction_fail_reply().

7 years agolib-smtp: client: transaction: Prevent early transaction abort in smtp_client_transac...
Stephan Bosch [Wed, 15 Aug 2018 20:39:58 +0000 (22:39 +0200)] 
lib-smtp: client: transaction: Prevent early transaction abort in smtp_client_transaction_fail_reply().

Can happen in one of the command callbacks of aborted commands.

7 years agolib-smtp: Remove trailing whitespace in smtp-cient-transaction.c.
Stephan Bosch [Thu, 16 Aug 2018 06:48:43 +0000 (08:48 +0200)] 
lib-smtp: Remove trailing whitespace in smtp-cient-transaction.c.

7 years agolib-smtp: Remove trailing whitespace in test-smtp-client-errors.c.
Stephan Bosch [Thu, 16 Aug 2018 06:47:37 +0000 (08:47 +0200)] 
lib-smtp: Remove trailing whitespace in test-smtp-client-errors.c.

7 years agolib: Add test for stats_dist_get_variance()
Martti Rannanjärvi [Tue, 31 Jul 2018 05:23:49 +0000 (08:23 +0300)] 
lib: Add test for stats_dist_get_variance()

7 years agolib,stats,dict: Make stats_dist_get_avg() return double
Martti Rannanjärvi [Mon, 20 Aug 2018 10:56:40 +0000 (13:56 +0300)] 
lib,stats,dict: Make stats_dist_get_avg() return double

7 years agomaster: Wait 1 second for SIGQUITs to get handled
Josef 'Jeff' Sipek [Mon, 20 Aug 2018 22:07:30 +0000 (18:07 -0400)] 
master: Wait 1 second for SIGQUITs to get handled

The delay (previously 100ms, now 1s) is intended to delay our exit enough so
that the child processes have a chance to receive & handle the SIGQUITs we
just sent.  If we don't wait long enough, it is possible that we'll get
restarted before our children had the chance to stop listening on their
sockets and we'll hit "address already in use" type errors.

Increasing the delay does not fix the issue, but it masks it better.

7 years agolib-index: mail_cache_lookup_headers() - Allow using datastack pool
Timo Sirainen [Mon, 20 Aug 2018 09:51:28 +0000 (12:51 +0300)] 
lib-index: mail_cache_lookup_headers() - Allow using datastack pool

This fixes assert caused by 53712af0e7f357e7279d9ff03831428aae85aa45:
Panic: pool_data_stack_realloc(): stack frame changed

7 years agolib-storage: Fix NUL handling in mail_get_first_header*(), mail_get_headers*()
Timo Sirainen [Fri, 17 Aug 2018 11:39:41 +0000 (14:39 +0300)] 
lib-storage: Fix NUL handling in mail_get_first_header*(), mail_get_headers*()

These functions return NUL-terminated values, so they got truncated whenever
a header value contained a NUL. Fix this by converting NULs to unicode
replacement characters in the output.

7 years agolib-mail: Make message_header_strdup() public
Timo Sirainen [Fri, 17 Aug 2018 11:33:50 +0000 (14:33 +0300)] 
lib-mail: Make message_header_strdup() public

Also move it to a better file.

7 years agolib-mail: Cleanup - Rename internal hdr_strdup() to message_header_strdup()
Timo Sirainen [Fri, 17 Aug 2018 17:16:29 +0000 (20:16 +0300)] 
lib-mail: Cleanup - Rename internal hdr_strdup() to message_header_strdup()

7 years agolib-mail: rfc822-parser - Handle \<NUL> in quoted-string and domain-literal
Timo Sirainen [Fri, 17 Aug 2018 11:12:25 +0000 (14:12 +0300)] 
lib-mail: rfc822-parser - Handle \<NUL> in quoted-string and domain-literal

It was already handled in comments. Previously this caused the strings and
domain-literals to be truncated at that position.

7 years agolib-mail: test-message-address - Test NULs in display-name
Timo Sirainen [Fri, 17 Aug 2018 10:42:35 +0000 (13:42 +0300)] 
lib-mail: test-message-address - Test NULs in display-name

7 years agolib: test-event-filter - Test overriding parent fields
Timo Sirainen [Thu, 16 Aug 2018 09:27:06 +0000 (12:27 +0300)] 
lib: test-event-filter - Test overriding parent fields

7 years agolib: Add event_field_clear() to allow clearing parent event's fields
Timo Sirainen [Thu, 16 Aug 2018 09:17:38 +0000 (12:17 +0300)] 
lib: Add event_field_clear() to allow clearing parent event's fields

7 years agolib: Add event_inc_int()
Timo Sirainen [Wed, 15 Aug 2018 13:33:49 +0000 (16:33 +0300)] 
lib: Add event_inc_int()

This can be useful when updating counter fields.

7 years agolib-http: test-http-client-errors: Make "peer reuse failure" test reliable.
Stephan Bosch [Mon, 13 Aug 2018 17:23:31 +0000 (19:23 +0200)] 
lib-http: test-http-client-errors: Make "peer reuse failure" test reliable.

It was highly timing-sensitive, since it required a particular error status to
be returned. Sometimes, it would yield a different error based on a
slightly different order of events, making the test fail. Such failures aren't
relevant though, since this regression test is about triggering a segfault that
used to occur.

7 years agoimap: Fix command ambiguity checking with special plugins
Timo Sirainen [Mon, 6 Aug 2018 09:39:25 +0000 (12:39 +0300)] 
imap: Fix command ambiguity checking with special plugins

If the tagged line is already sent, that command can't result in ambiguity
anymore.

A cleaner fix would be to add a new _WAIT_SYNC_OUTPUT state, but that
requires all the existing code to understand that new state correctly, so it
has a higher chance of breaking something. So at least for now don't add it.

7 years agolib: test-strfuncs - Rename test i_strbegins to str_begins
Aki Tuomi [Mon, 6 Aug 2018 08:34:35 +0000 (11:34 +0300)] 
lib: test-strfuncs - Rename test i_strbegins to str_begins

Matches the real name

7 years agodoveconf: Fix compiler nit
Aki Tuomi [Mon, 6 Aug 2018 08:36:41 +0000 (11:36 +0300)] 
doveconf: Fix compiler nit

Ensure secret_r cannot be NULL unless none was found.

7 years agodoveconf: Improve secret hiding
Aki Tuomi [Tue, 14 Aug 2018 12:25:40 +0000 (15:25 +0300)] 
doveconf: Improve secret hiding

Hide with more wide filtering.

7 years agodoveconf: Use key_ends_with to compare suffixes
Aki Tuomi [Tue, 14 Aug 2018 12:24:56 +0000 (15:24 +0300)] 
doveconf: Use key_ends_with to compare suffixes

Fixes key hiding.

Broken in 1518e085

7 years agoauth: mycrypt - include crypt.h
Aki Tuomi [Wed, 8 Aug 2018 09:33:20 +0000 (12:33 +0300)] 
auth: mycrypt - include crypt.h

Fixes crypt usage on glibc-2.28

Reported by Reuben Farrelly
Patch provided by Thore Bödecker

7 years agolib-smtp: Read input before exiting in sendmail-exit-1.sh
Martti Rannanjärvi [Mon, 13 Aug 2018 08:25:04 +0000 (11:25 +0300)] 
lib-smtp: Read input before exiting in sendmail-exit-1.sh

This avoids a Broken pipe error that fails the unit test this script
belongs to.

7 years agolib-smtp: Include test-bin in dist
Aki Tuomi [Thu, 9 Aug 2018 06:21:09 +0000 (09:21 +0300)] 
lib-smtp: Include test-bin in dist

7 years agolib-test: Warn if test_run or test_run_named result is not used
Aki Tuomi [Thu, 9 Aug 2018 09:38:43 +0000 (12:38 +0300)] 
lib-test: Warn if test_run or test_run_named result is not used

Ensures hopefully that unit tests do not succeed when they fail
due to wrong exit code.

7 years agoglobal: Ensure unit tests return value
Aki Tuomi [Thu, 9 Aug 2018 09:44:22 +0000 (12:44 +0300)] 
global: Ensure unit tests return value

7 years agolib: Remove murmurhash3
Aki Tuomi [Wed, 1 Aug 2018 07:45:08 +0000 (10:45 +0300)] 
lib: Remove murmurhash3

It is not used anywhere

7 years agolib: Remove bloomfilter
Aki Tuomi [Wed, 1 Aug 2018 07:44:44 +0000 (10:44 +0300)] 
lib: Remove bloomfilter

It is not used anywhere

7 years agolib-ssl-iostream: Remove unused DH members
Aki Tuomi [Tue, 31 Jul 2018 09:26:35 +0000 (12:26 +0300)] 
lib-ssl-iostream: Remove unused DH members

These are not being used anywhere.

7 years agolib-ssl-iostream: Make DH parameters optional
Aki Tuomi [Mon, 30 Jul 2018 17:26:19 +0000 (20:26 +0300)] 
lib-ssl-iostream: Make DH parameters optional

Since a lot of connections use elliptic curve
Diffie-Hellman these days, make it possible to
use dovecot without providing Diffie-Hellman
parameters. This reduces setup cost as the
parameters do not need to be generated, which
can be a time consuming task.

7 years agodoveconf: Do not skip over secrets when hiding them
Aki Tuomi [Wed, 1 Aug 2018 05:47:34 +0000 (08:47 +0300)] 
doveconf: Do not skip over secrets when hiding them

All candidates for hiding need to be considered, otherwise
it might skip over some of them and leave them unhidden.

7 years agolib-dict-backend: Fix linking order for test-dict-sql
Timo Sirainen [Tue, 31 Jul 2018 09:40:28 +0000 (12:40 +0300)] 
lib-dict-backend: Fix linking order for test-dict-sql

7 years agoconfig: generation of clean config should copy sensitive data
Michael M Slusarz [Tue, 31 Jul 2018 22:32:48 +0000 (16:32 -0600)] 
config: generation of clean config should copy sensitive data

Add -P parameter to the CLI warning doveconf example

7 years agoman: Add missing commands to doveadm
Michael M Slusarz [Tue, 31 Jul 2018 23:40:08 +0000 (17:40 -0600)] 
man: Add missing commands to doveadm

7 years agolib-master: Copy ssl_curve_list setting
Aki Tuomi [Tue, 31 Jul 2018 05:45:29 +0000 (08:45 +0300)] 
lib-master: Copy ssl_curve_list setting

Otherwise it won't get used.

Broken in 30dca95419

7 years agolib-imap: Remove content_subtype==NULL checks
Timo Sirainen [Tue, 24 Jul 2018 12:00:19 +0000 (15:00 +0300)] 
lib-imap: Remove content_subtype==NULL checks

This can never happen after the previous commit. This also changes the
BODYSTRUCTURE output for invalid Content-Types, but since they're invalid
anyway it doesn't really matter what the output is.

7 years agolib-mail: If message_part_data.content_type is set, make sure content_subtype isn...
Timo Sirainen [Tue, 24 Jul 2018 11:55:25 +0000 (14:55 +0300)] 
lib-mail: If message_part_data.content_type is set, make sure content_subtype isn't NULL

This fixes a crash in index_mail_find_first_text_mime_part() where snippet
generation assumed that content_subtype isn't NULL.

7 years agolib-storage: Fix bodystructure parsing crash if header is parsed twice
Timo Sirainen [Wed, 25 Jul 2018 10:17:45 +0000 (13:17 +0300)] 
lib-storage: Fix bodystructure parsing crash if header is parsed twice

The second parsing will recreate the parser_ctx, discarding the old parsed
message_part.data for the header. On the second parsing
save_bodystructure_header=FALSE so the message_part.data isn't filled for
the header. Later on the bodystructure parsing assumes the data is set,
and crashes.

This only happened with mail_attachment_detection_options=add-flags-on-save
and Sieve script that first accessed a non-cached header and then used the
"body" extension.

Fixes segfault and also:
Panic: file imap-bodystructure.c: line 116 (part_write_body_multipart): assertion failed: (part->data != NULL)

7 years agolib-mail: Add asserts to message_part_*() to make sure part->data isn't NULL
Timo Sirainen [Wed, 25 Jul 2018 10:17:05 +0000 (13:17 +0300)] 
lib-mail: Add asserts to message_part_*() to make sure part->data isn't NULL

This makes it easier to debug the crashes than just having a segfault.

7 years agom4, quota: Support rquota using libtirpc
Timo Sirainen [Mon, 9 Jul 2018 08:39:59 +0000 (11:39 +0300)] 
m4, quota: Support rquota using libtirpc

7 years agom4: Enable rquota only if rpc/rpc.h exists
Timo Sirainen [Mon, 9 Jul 2018 08:33:23 +0000 (11:33 +0300)] 
m4: Enable rquota only if rpc/rpc.h exists

It's been removed in glibc 2.26

7 years agodirector: Allow fully freeing user while waiting for IPC kick to finish
Timo Sirainen [Thu, 5 Jul 2018 11:55:38 +0000 (14:55 +0300)] 
director: Allow fully freeing user while waiting for IPC kick to finish

director_user_move_free() will now just free the IPC command, so this isn't
a problem anymore.

7 years agodirector: Fix crash when user kill times out before IPC finishes
Timo Sirainen [Thu, 5 Jul 2018 11:53:02 +0000 (14:53 +0300)] 
director: Fix crash when user kill times out before IPC finishes

Abort the IPC kick command when freeing kill context so the IPC callback
won't be called.

7 years agolib-master: ipc-client: Support aborting commands
Timo Sirainen [Thu, 5 Jul 2018 11:42:30 +0000 (14:42 +0300)] 
lib-master: ipc-client: Support aborting commands

7 years agolib-master: ipc-client: Cleanup - avoid extra return in the function
Timo Sirainen [Thu, 5 Jul 2018 11:41:38 +0000 (14:41 +0300)] 
lib-master: ipc-client: Cleanup - avoid extra return in the function

Simplifies the following commit.

7 years agolib-master: ipc-client: Never call callback directly from ipc_client_cmd()
Timo Sirainen [Thu, 5 Jul 2018 11:38:51 +0000 (14:38 +0300)] 
lib-master: ipc-client: Never call callback directly from ipc_client_cmd()

This may simplify the calling code, especially after the following commit
that returns the command pointer.

7 years agolib-master: ipc-client: Split code to ipc_client_abort_commands()
Timo Sirainen [Thu, 5 Jul 2018 11:35:51 +0000 (14:35 +0300)] 
lib-master: ipc-client: Split code to ipc_client_abort_commands()

7 years agolib-master: ipc-client: Use linked list of commads instead of array
Timo Sirainen [Thu, 5 Jul 2018 11:25:46 +0000 (14:25 +0300)] 
lib-master: ipc-client: Use linked list of commads instead of array

Needed for the following commit that returns the command pointer.

7 years agolib-master: ipc-client: Don't call callback twice if IPC proxy sends invalid input
Timo Sirainen [Thu, 5 Jul 2018 10:40:43 +0000 (13:40 +0300)] 
lib-master: ipc-client: Don't call callback twice if IPC proxy sends invalid input

ipc_client_disconnect() called it once, and the second time was done with
the cmds[0] that was already removed from the array.

7 years agolib-auth: Fix reconnect timeout leak at deinit
Timo Sirainen [Fri, 6 Jul 2018 08:22:46 +0000 (11:22 +0300)] 
lib-auth: Fix reconnect timeout leak at deinit

7 years agologin-proxy: Fix logging reason when kicking non-logged in connections
Timo Sirainen [Fri, 6 Jul 2018 10:12:51 +0000 (13:12 +0300)] 
login-proxy: Fix logging reason when kicking non-logged in connections

Use the same reason as for logged in connections.

7 years agologin-proxy: Fix potential crash when kicking user with alt username
Timo Sirainen [Fri, 6 Jul 2018 10:23:58 +0000 (13:23 +0300)] 
login-proxy: Fix potential crash when kicking user with alt username

If a new alt username field was returned after other users already were
being proxied, trying to kick with the new alt username field will crash.

7 years agolib-http: client: Notify host object about submission of request before submitting...
Stephan Bosch [Fri, 6 Jul 2018 13:07:32 +0000 (15:07 +0200)] 
lib-http: client: Notify host object about submission of request before submitting the request to the queue.

This makes sure the host idle timeout is stopped before the request is submitted
and the host object's refresh function is called. If the idle timeout is still
running at that point, the refresh function will return success without
performing a lookup, which can lead to a panic.

Panic was:

Panic: file ./http-client-private.h: line 672 (http_client_host_get_ip): assertion failed: (idx < host->shared->ips_count)

7 years agolib-http: client: Reset ips count to zero before DNS lookup.
Stephan Bosch [Mon, 2 Jul 2018 21:59:50 +0000 (23:59 +0200)] 
lib-http: client: Reset ips count to zero before DNS lookup.

7 years agoauth: Fix nonexistent passwd-file error handling
Timo Sirainen [Wed, 4 Jul 2018 09:45:39 +0000 (12:45 +0300)] 
auth: Fix nonexistent passwd-file error handling

If the path uses %variables, the missing file was logged with info-level,
but it was still returning tempfail as the result. Return "user doesn't
exist" instead.