allow_nets=local in passdb gets "auth: Panic"

Timo Sirainen tss at iki.fi
Tue Jan 5 16:11:28 UTC 2016


On 05 Jan 2016, at 10:31, SATOH Fumiyasu <fumiyas at osstech.jp> wrote:
> 
> At Mon, 4 Jan 2016 14:19:52 -0500,
> Timo Sirainen wrote:
>>> Dec 22 14:57:39 localhost dovecot: auth: ldap(u0000,::1,<oiF8SHYngqsAAAAAAAAAAAAAAAAAAAAB>): allow_nets: Invalid network 'local'
>>> Dec 22 14:57:39 localhost dovecot: auth: Panic: file net.c: line 1137 (net_is_in_network): assertion failed: (IPADDR_IS_V6(ip) == IPADDR_IS_V6(net_ip))
>>> 
>>> `doveadm auth test <username> <password>` is no problem as expected.
>>> 
>>> What's wrong?
>> 
>> allow_nets can only contain IP/network ranges. You can't use any names like "local". Anyway, it still shouldn't crash. This fixes it:
> 
> Dovecot 2.2.15 has the following change:
> 
>        + passdb allow_nets=local matches lookups that don't contain an IP
>          address (internally done by Dovecot services)
> 
> I use the "allow_nets=local" to allow administrtors to run
> `doveadm auth test username`.  If allow_nets has no "local",
> it is failed (rejected?). Is this a bug?

Oh, I forgot entirely that exists. And looks like it was buggy. Fixed:

https://github.com/dovecot/core/commit/e7ff41f105ef1e7577ff0fa34554478e95efd0d4



More information about the dovecot mailing list