[dovecot/core] 36199f: auth: Fix passwd-file logging on missing passwd-fi...

GitHub noreply at github.com
Sat May 19 12:30:09 EEST 2018


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: 36199f6935c2b53f34fa02122243a247b92ea714
      https://github.com/dovecot/core/commit/36199f6935c2b53f34fa02122243a247b92ea714
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2018-05-19 (Sat, 19 May 2018)

  Changed paths:
    M src/auth/db-passwd-file.c

  Log Message:
  -----------
  auth: Fix passwd-file logging on missing passwd-file

This reduces log clutter in production systems that use per-domain
password files by logging the missing file information only
when auth_verbose=yes.

Broken in daabad64d90d6008215e234287255a56312e7b72


  Commit: 861d40b9aebabccae7d48e49a18cbc631ab1fefe
      https://github.com/dovecot/core/commit/861d40b9aebabccae7d48e49a18cbc631ab1fefe
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-05-19 (Sat, 19 May 2018)

  Changed paths:
    M src/lib/failures.c

  Log Message:
  -----------
  lib: Fix potential crashes when writing to log fails with EAGAIN

The ioloop may nowadays call ioloop context switch callbacks. Since log
writing can happen just about anywhere, the callbacks may be confused
and cause crashes or other weird behavior.

Even if the callbacks aren't called, all the extra code in ioloop can cause
potential problems. Especially any error logging in it wouldn't work properly
since it would just recurse back. So replace the ioloop code with just setting
the log fd to be blocking until the write succeeds.

This commit also removes comments about writes to a blocking terminal fd
causing EAGAINs. This seems unlikely. Probably I was just somehow
confused when originally seeing it and writing the code. If it actually
does happen now, it's still not breaking anything, but it could get into
a busy-loop of write()s constantly returning EAGAIN until they succeed.


Compare: https://github.com/dovecot/core/compare/ca4c2579f045...861d40b9aeba
      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the dovecot-cvs mailing list