--- xorg-server-20100716/os/access.c.orig 2010-07-16 07:47:35.000000000 +0300 +++ xorg-server-20100716/os/access.c 2010-08-09 17:08:37.501428488 +0300 @@ -267,6 +267,13 @@ EnableLocalHost (void) { if (!UsingXdmcp) { + HOST *hosttmp; + + for (hosttmp = validhosts; hosttmp; hosttmp = hosttmp->next) + { + if ((hosttmp->family == FamilyServerInterpreted)) + return; + } LocalHostEnabled = TRUE; AddLocalHosts (); } @@ -1018,9 +1025,16 @@ ResetHosts (char *display) if (family == FamilyServerInterpreted) { - len = siCheckAddr(hostname, hostlen); - if (len >= 0) { - NewHost(family, hostname, len, FALSE); + char *delim; + + delim = strchr(hostname, ':'); + if (delim) { + *delim = '\0'; + len = siCheckAddr(hostname, hostlen); + *delim = ':'; + if (len >= 0) { + NewHost(family, hostname, hostlen, FALSE); + } } } else @@ -1771,8 +1785,11 @@ siAddrMatch(int family, pointer addr, in Bool matches = FALSE; struct siType *s; const char *valueString; - int addrlen; + int addrlen = 0; + char *delim; + delim = memchr(host->addr, ':', host->len); + if (delim) *delim = '\0'; valueString = (const char *) memchr(host->addr, '\0', host->len); if (valueString != NULL) { for (s = siTypeList; s != NULL ; s = s->next) {