[dovecot/core | refs/heads/master-2.3] 808f0731: m4: Fix moduledir behaviour

noreply at dovecot.org noreply at dovecot.org
Fri Feb 15 15:00:15 EET 2019


  Branch: refs/heads/master-2.3
  Home:   https://github.com/dovecot/core
  Commit: 808f0731ce940002f925ea9630bef75c2600b02b
      https://github.com/dovecot/core/commit/808f0731ce940002f925ea9630bef75c2600b02b
  Author: Aki Tuomi <aki.tuomi at open-xchange.com>
  Date:   2019-02-15 (Fri, 15 Feb 2019)

  Changed paths:
    M configure.ac
    M m4/dovecot.m4

  Log Message:
  -----------
  m4: Fix moduledir behaviour

This is mainly a fix for plugins that depend on dovecot.m4

  Commit: b5a86f084c1670bb51e73a032b86ef5f95ace687
      https://github.com/dovecot/core/commit/b5a86f084c1670bb51e73a032b86ef5f95ace687
  Author: Phil Carmody <phil at dovecot.fi>
  Date:   2019-02-15 (Fri, 15 Feb 2019)

  Changed paths:
    M m4/dovecot.m4

  Log Message:
  -----------
  m4/dovecot.m4: rename valgrind output file to hide it from certain tests

Some lib-http tests use readdir() to create test cases, and sometimes
object to the contents of test.out.$$. However, as lib-http is also
sensitive to certain characters in the filenames of the files it uses,
we can hide the valgrind output by chosing its filename to exclude it
from the lib_http tests. Non-initial '~' is not known to cause any issues
for either the shell or any known operating system, so is the safest of
lib-http's 'dodgy' characters to use as the separator.

Signed-off-by: Phil Carmody <phil at dovecot.fi>

  Commit: a8d087136f4b99dd462a1c1c82d47ed25523de89
      https://github.com/dovecot/core/commit/a8d087136f4b99dd462a1c1c82d47ed25523de89
  Author: Phil Carmody <phil at dovecot.fi>
  Date:   2019-02-15 (Fri, 15 Feb 2019)

  Changed paths:
    M m4/dovecot.m4

  Log Message:
  -----------
  m4/dovecot.m4 - Apply DRY principle to test output filename

Define the name we will use for the file once, then just use that variable
instead of using explicit repeatition.

Signed-off-by: Phil Carmody <phil at dovecot.fi>

  Commit: 764ef7e0069a434e1b41e7c8d140ca235d48a8ec
      https://github.com/dovecot/core/commit/764ef7e0069a434e1b41e7c8d140ca235d48a8ec
  Author: Phil Carmody <phil at dovecot.fi>
  Date:   2019-02-15 (Fri, 15 Feb 2019)

  Changed paths:
    M m4/dovecot.m4

  Log Message:
  -----------
  m4/dovecot.m4: run-test.sh - disable valgrind for individual tests

OpenSSL doesn't like valgrind on my setup, so permit a local instalation
to have a list of excluded binaries that won't use valgrind in make check.

Signed-off-by: Phil Carmody <phil at dovecot.fi>

  Commit: e1e7ff077472225b496834e4e6e75eadffb212ed
      https://github.com/dovecot/core/commit/e1e7ff077472225b496834e4e6e75eadffb212ed
  Author: Phil Carmody <phil at dovecot.fi>
  Date:   2019-02-15 (Fri, 15 Feb 2019)

  Changed paths:
    M src/lib-http/test-http-payload.c
    M src/lib-http/test-http-server-errors.c

  Log Message:
  -----------
  lib-http: increase pool sizes in tests

Pool growth messages spam the test output, just dive in with a slightly
larger default to shut them up. Only affects these individual tests,
not any other users of the library.

Signed-off-by: Phil Carmody <phil at dovecot.fi>

  Commit: 18b8e66b9118c551c62fb2b2869c8cf786cab8d8
      https://github.com/dovecot/core/commit/18b8e66b9118c551c62fb2b2869c8cf786cab8d8
  Author: Phil Carmody <phil at dovecot.fi>
  Date:   2019-02-15 (Fri, 15 Feb 2019)

  Changed paths:
    M src/lib-http/http-client.c
    M src/lib-http/http-server.c

  Log Message:
  -----------
  lib-http: change default client/server pool sizes when using SSL

SSL carries a lot of state with it, so just start with a bigger
pool if we know we're using it.

Signed-off-by: Phil Carmody <phil at dovecot.fi>

  Commit: 4db5e9398268432eaebae286bfd80addb3fa8140
      https://github.com/dovecot/core/commit/4db5e9398268432eaebae286bfd80addb3fa8140
  Author: Phil Carmody <phil at dovecot.fi>
  Date:   2019-02-15 (Fri, 15 Feb 2019)

  Changed paths:
    M src/lib-http/test-http-payload.c

  Log Message:
  -----------
  lib-http: harden payload tests against dodgy filenames

Tests use files from readdir() as input, but do no sanitation of the
names, and therefore things like editor temp files can cause havoc
with the HTTP request parser.

The solution is to trap dodgy characters in the filenames, and ignore
those files. Initially, trap HTTP's "unsafe" and "reserved" characters.

Signed-off-by: Phil Carmody <phil at dovecot.fi>

  Commit: 690b2c96890fa74d0a903a4cd76d3077743595e9
      https://github.com/dovecot/core/commit/690b2c96890fa74d0a903a4cd76d3077743595e9
  Author: Stephan Bosch <stephan.bosch at dovecot.fi>
  Date:   2019-02-15 (Fri, 15 Feb 2019)

  Changed paths:
    M src/lib-mail/test-ostream-dot.c

  Log Message:
  -----------
  lib-mail: ostream-dot - Add unit test for parent stream buffer being almost full.

  Commit: cc1c3fb1e40e408d33692ec6ccbd4978751f3949
      https://github.com/dovecot/core/commit/cc1c3fb1e40e408d33692ec6ccbd4978751f3949
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2019-02-15 (Fri, 15 Feb 2019)

  Changed paths:
    M src/lib-mail/ostream-dot.c

  Log Message:
  -----------
  lib-mail: ostream-dot - Add asserts to make sure max_bytes doesn't underflow

  Commit: 3df4e47db28f06c983bfe7197e151d985235d3d3
      https://github.com/dovecot/core/commit/3df4e47db28f06c983bfe7197e151d985235d3d3
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2019-02-15 (Fri, 15 Feb 2019)

  Changed paths:
    M src/lib-mail/ostream-dot.c

  Log Message:
  -----------
  lib-mail: ostream-dot - Fix potential assert-crash when parent stream buffer gets full

If max_bytes=1, the (max_bytes-2) calculation brings it to (size_t)-1. This
causes too much data to be sent to the parent stream, which then returns a
partial write and causes an assert-crash.

The final chunk calculation doesn't need the -2 check, because additional
bytes aren't inserted at that point.

Fixes:
Panic: file ostream-dot.c: line 208 (o_stream_dot_sendv): assertion failed: ((size_t)ret == sent + added)

  Commit: 848d08733cdfc4fefdf8d70dc8920d4391bb1bb7
      https://github.com/dovecot/core/commit/848d08733cdfc4fefdf8d70dc8920d4391bb1bb7
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2019-02-14 (Thu, 14 Feb 2019)

  Changed paths:
    M src/lib/buffer.c

  Log Message:
  -----------
  lib: Fix buffer code to satisfy static analyzers

  Commit: c6ec64a050fa465cd2ab8fa5a6d6e9cc5108908a
      https://github.com/dovecot/core/commit/c6ec64a050fa465cd2ab8fa5a6d6e9cc5108908a
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2019-02-14 (Thu, 14 Feb 2019)

  Changed paths:
    M src/lib/randgen.c

  Log Message:
  -----------
  lib: randgen - Init seed to 0

Satisfies static analyzer, the seed is guaranteed to get
filled with random data.

  Commit: 94dc9b09741ecec99144eb1f6fb190e33d234315
      https://github.com/dovecot/core/commit/94dc9b09741ecec99144eb1f6fb190e33d234315
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2019-02-14 (Thu, 14 Feb 2019)

  Changed paths:
    M src/plugins/trash/trash-plugin.c

  Log Message:
  -----------
  trash: Use TRASH_USER_CONTEXT_REQUIRE

Satisfies static analyzer

  Commit: 8463321f544d022efbeeaa0cf79c5a0555e1484b
      https://github.com/dovecot/core/commit/8463321f544d022efbeeaa0cf79c5a0555e1484b
  Author: Phil Carmody <phil at dovecot.fi>
  Date:   2019-02-14 (Thu, 14 Feb 2019)

  Changed paths:
    M src/lib/randgen.c

  Log Message:
  -----------
  lib/randgen - warn when DOVECOT_SRAND is not able to be used

As suggested by Jeff, it's friendly to warn if we're unable to act
upon the request for reproduceable random numbers because we're not
built for that.

Note, this deliberately permits a blank string, so that you can
silence the warning by prefixing a command with an empty
  DOVECOT_SRAND=
which is taken as an explicit attempt to disable use of the feature.

Signed-off-by: Phil Carmody <phil at dovecot.fi>

  Commit: 00a3985258940b76d91b939ebdc2e75b3f2c1e13
      https://github.com/dovecot/core/commit/00a3985258940b76d91b939ebdc2e75b3f2c1e13
  Author: Phil Carmody <phil at dovecot.fi>
  Date:   2019-02-14 (Thu, 14 Feb 2019)

  Changed paths:
    M src/lib-test/test-common.c
    M src/lib/randgen.c
    M src/lib/randgen.h

  Log Message:
  -----------
  lib/lib-test: restore DOVECOT_SRAND feature in DEBUG builds

Add a deterministic PRNG, an ability to force its use, and an
ability to re-use the same sequence later.

Since proper random numbers have been forced into use, making
reproducable tests isn't quite as easy as it used to be, it's 3 steps
rather than 2. When seeing an intermittent test failure:
 - rerun the tests with environmental variable DOVECOT_SRAND=kiss
 - upon seeing a new failure case, note the seed logged at the failure
 - debug using DOVECOT_SRAND=<that number>

In non-DEBUG builds, there's no trace of this code, and the
randomisation that is an inherent part of many tests remains
non-reproduceable.

Works with all of the RNG preferences, getrandom/urandom/arc4.

Signed-off-by: Phil Carmody <phil at dovecot.fi>

  Patch: https://github.com/dovecot/core/compare/b8cc5abe094f...808f0731ce94.patch


More information about the dovecot-cvs mailing list