[Dovecot] Secure connection from "localhost" in jails

Timo Sirainen tss at iki.fi
Sat Jul 1 23:06:10 EEST 2006


On Thu, 2006-06-29 at 19:19 +0200, Dirk Engling wrote:
>          addr = net_ip2addr(ip);
> +        local_addr = net_ip2addr(local_ip);
>         client->common.secured = ssl ||
>                 (IPADDR_IS_V4(ip) && strncmp(addr, "127.", 4) == 0) ||
> +               (IPADDR_IS_V4(ip) && strncmp(addr, local_addr,
> strlen(local_addr)) == 0) ||
>                 (IPADDR_IS_V6(ip) && (strcmp(addr, "::1") == 0 ||
>                                       strncmp(addr, "::ffff:127.", 11)
> == 0));

Actually all this can be done much more easily:

	client->common.secured = ssl || net_ip_compare(ip, local_ip);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20060701/f5adbbf1/attachment.pgp


More information about the dovecot mailing list