[dovecot-cvs] dovecot/src/imap-login client.c,1.51,1.51.2.1
cras at dovecot.org
cras at dovecot.org
Sat Jul 1 23:09:08 EEST 2006
Update of /var/lib/cvs/dovecot/src/imap-login
In directory talvi:/tmp/cvs-serv1415/src/imap-login
Modified Files:
Tag: branch_1_0
client.c
Log Message:
Removed hardcoded 127.* and ::1 IP checks. Instead just check that local IP
matches remote IP to assume the connection is secure.
Index: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap-login/client.c,v
retrieving revision 1.51
retrieving revision 1.51.2.1
diff -u -d -r1.51 -r1.51.2.1
--- client.c 14 Apr 2006 18:20:54 -0000 1.51
+++ client.c 1 Jul 2006 20:09:06 -0000 1.51.2.1
@@ -411,7 +411,6 @@
const struct ip_addr *ip)
{
struct imap_client *client;
- const char *addr;
if (max_logging_users > CLIENT_DESTROY_OLDEST_COUNT &&
hash_size(clients) >= max_logging_users) {
@@ -427,12 +426,7 @@
client->created = ioloop_time;
client->refcount = 1;
client->common.tls = ssl;
-
- addr = net_ip2addr(ip);
- client->common.secured = ssl ||
- (IPADDR_IS_V4(ip) && strncmp(addr, "127.", 4) == 0) ||
- (IPADDR_IS_V6(ip) && (strcmp(addr, "::1") == 0 ||
- strncmp(addr, "::ffff:127.", 11) == 0));
+ client->common.secured = ssl || net_ip_compare(ip, local_ip);
client->common.local_ip = *local_ip;
client->common.ip = *ip;
More information about the dovecot-cvs
mailing list