[dovecot/core] 7d8c1b: director: Fix off-by-one when checking if user wea...

GitHub noreply at github.com
Mon Nov 6 10:30:10 EET 2017


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: 7d8c1ba766770ea1c6d4d6770a31832b5b518648
      https://github.com/dovecot/core/commit/7d8c1ba766770ea1c6d4d6770a31832b5b518648
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/director/user-directory.c

  Log Message:
  -----------
  director: Fix off-by-one when checking if user weakness is stuck

When the weakness was exactly at the second, the weakness wasn't detected
and the next expiration timeout was removed entirely. This shouldn't have
caused any bigger problems, because another user lookup on the following
second would have then detected the weakness, removed the user and restored
the next expiration timeout.


  Commit: 27006b32276426acf449bd0ea7a35ed19389ae6b
      https://github.com/dovecot/core/commit/27006b32276426acf449bd0ea7a35ed19389ae6b
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/director/user-directory.c

  Log Message:
  -----------
  director: Don't recreate timeout on every user lookup

Recreate it only when the timeout should change.


  Commit: 60212a51eb0e34a90fd3416a8a6c0047814ee968
      https://github.com/dovecot/core/commit/60212a51eb0e34a90fd3416a8a6c0047814ee968
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/lib/strescape.c

  Log Message:
  -----------
  lib: str_tabunescape() - optimize initial escape char lookup

strchr() is faster than looping ourself.


  Commit: 4ec55911f4a7244ac2829570416f57623d5d1d5a
      https://github.com/dovecot/core/commit/4ec55911f4a7244ac2829570416f57623d5d1d5a
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/lib/strescape.c

  Log Message:
  -----------
  lib: t_strsplit_tabescaped() - don't create unnecessary data stack mempool

unsafe_data_stack_pool is more efficient to use


  Commit: 5d8ee65c00a528fab2b75ec63d68493a28d68b62
      https://github.com/dovecot/core/commit/5d8ee65c00a528fab2b75ec63d68493a28d68b62
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/lib/test-strescape.c

  Log Message:
  -----------
  lib: test-strescape - Refactor the unit test to use an array of tests


  Commit: 7de17a595a44e61714d3fc7e55491449d38a8e62
      https://github.com/dovecot/core/commit/7de17a595a44e61714d3fc7e55491449d38a8e62
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

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

  Log Message:
  -----------
  lib: Implement t_strsplit_tabescaped_inplace()

This is a more efficient version of t_strsplit_tabescaped(), which modifies
the input string instead of duplicating it.


  Commit: 8587f4288b357bd83f2ec72b4197b529cf02220a
      https://github.com/dovecot/core/commit/8587f4288b357bd83f2ec72b4197b529cf02220a
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/lib/test-strfuncs.c

  Log Message:
  -----------
  lib: test-strfuncs - Improve *_strsplit*() unit tests


  Commit: b7b202953ea655bba74ca8b0236694c722a0b771
      https://github.com/dovecot/core/commit/b7b202953ea655bba74ca8b0236694c722a0b771
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/lib/strfuncs.c
    M src/lib/test-strfuncs.c

  Log Message:
  -----------
  lib: *_strsplit() - implement more efficient version for a single separator char


  Commit: 8e9616d70b68aab3b95f89410ba6e8872c5039e8
      https://github.com/dovecot/core/commit/8e9616d70b68aab3b95f89410ba6e8872c5039e8
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/lib/net.c

  Log Message:
  -----------
  lib: net_ip2addr() - Optimize by allocating destination memory immediately

It doesn't really matter if we allocate a few extra bytes.


  Commit: 1c0491ba032261214900e0795efd49b3e264da9d
      https://github.com/dovecot/core/commit/1c0491ba032261214900e0795efd49b3e264da9d
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/lib/net.c
    M src/lib/test-net.c

  Log Message:
  -----------
  lib: net_addr2ip() - Optimize for parsing IPv4 addresses


  Commit: e8d44b65aab0a6723e7906756d0825e22ee85a82
      https://github.com/dovecot/core/commit/e8d44b65aab0a6723e7906756d0825e22ee85a82
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/director/director-connection.c

  Log Message:
  -----------
  director: Use t_strsplit_tabescaped_inplace() for director connection input


  Commit: cfc891de6eeafd4bf17baa030360acd5447182d9
      https://github.com/dovecot/core/commit/cfc891de6eeafd4bf17baa030360acd5447182d9
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/director/mail-host.c
    M src/director/mail-host.h

  Log Message:
  -----------
  director: Add mail_host.ip_str

This avoids having to use net_ip2addr() all the time to convert it into a
string.


  Commit: b7650f081ff781c39fe00a3b93375e5f2dd14236
      https://github.com/dovecot/core/commit/b7650f081ff781c39fe00a3b93375e5f2dd14236
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/director/director-host.c
    M src/director/director-host.h

  Log Message:
  -----------
  director: Add director_host.ip_str

This avoids having to use net_ip2addr() all the time to convert it into a
string.


  Commit: bd4bbe6478a97e3fab77b05257dd1397c7c090ea
      https://github.com/dovecot/core/commit/bd4bbe6478a97e3fab77b05257dd1397c7c090ea
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/director/director-connection.c
    M src/director/director-host.c
    M src/director/director.c
    M src/director/doveadm-connection.c
    M src/director/mail-host.c

  Log Message:
  -----------
  director: Use *_host.ip_str to avoid net_ip2addr() calls


  Commit: 1b418300cc37ca9118f8a9b9e68176276267aef0
      https://github.com/dovecot/core/commit/1b418300cc37ca9118f8a9b9e68176276267aef0
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/director/director-request.c
    M src/director/director-request.h
    M src/director/login-connection.c

  Log Message:
  -----------
  director: Change request callback to take mail_host parameter

This allows accessing the IP address both as struct and as string without
any conversions.


  Commit: 7b3acba3f2baf9710bf9b2bb17cdb92ff8937714
      https://github.com/dovecot/core/commit/7b3acba3f2baf9710bf9b2bb17cdb92ff8937714
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/director/login-connection.c

  Log Message:
  -----------
  director: Avoid str_printfa() in login_host_callback()

Optimizes the CPU usage.


  Commit: 6b740bf2d35b25dcc607cfd16593fe912ec49812
      https://github.com/dovecot/core/commit/6b740bf2d35b25dcc607cfd16593fe912ec49812
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/director/director-connection.c

  Log Message:
  -----------
  director: Avoid str_printfa() in director_connection_send_users()

Optimizes the CPU usage.


  Commit: 4039fdc2656faabde1c1e43bfc349ff4df13be53
      https://github.com/dovecot/core/commit/4039fdc2656faabde1c1e43bfc349ff4df13be53
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-11-06 (Mon, 06 Nov 2017)

  Changed paths:
    M src/lib/strnum.c

  Log Message:
  -----------
  lib: str_parse/to_*int*() - minor optimization


Compare: https://github.com/dovecot/core/compare/872c2b1209f4...4039fdc2656f


More information about the dovecot-cvs mailing list