Lines Matching refs:host

200 #define addrEqual(fam, address, length, host) \
201 ((fam) == (host)->family &&\
202 (length) == (host)->len &&\
203 !acmp (address, (host)->addr, length))
223 local host entries when stronger authentication is turned on. */
247 static Bool siAddrMatch(int family, pointer addr, int len, HOST *host,
254 * local host to the access list
333 * Define this host for access control. Find all the hosts the OS knows about
348 register HOST *host;
409 for (host = selfhosts;
410 host && !addrEqual (family, addr, len, host);
411 host = host->next) ;
412 if (!host)
414 /* add this host to the host list. */
415 MakeHost(host,len)
416 if (host)
418 host->family = family;
419 host->len = len;
420 acopy ( addr, host->addr, len);
421 host->next = selfhosts;
422 selfhosts = host;
457 * now add a host of family FamilyLocalHost...
460 for (host = selfhosts;
461 host && !addrEqual(FamilyLocalHost, "", 0, host);
462 host = host->next);
463 if (!host)
465 MakeHost(host, 0);
466 if (host)
468 host->family = FamilyLocalHost;
469 host->len = 0;
470 acopy("", host->addr, 0);
471 host->next = selfhosts;
472 selfhosts = host;
538 register HOST *host;
596 for (host = selfhosts;
597 host && !addrEqual (family, addr, len, host);
598 host = host->next)
600 if (host)
602 MakeHost(host,len)
603 if (host)
605 host->family = family;
606 host->len = len;
607 acopy(addr, host->addr, len);
608 host->next = selfhosts;
609 selfhosts = host;
729 for (host = selfhosts;
730 host != NULL && !addrEqual(family, addr, len, host);
731 host = host->next)
733 if (host != NULL)
735 MakeHost(host, len);
736 if (host != NULL) {
737 host->family = family;
738 host->len = len;
739 acopy(addr, host->addr, len);
740 host->next = selfhosts;
741 selfhosts = host;
804 for (host = selfhosts;
805 host && !addrEqual(FamilyLocalHost, "", 0, host);
806 host = host->next);
807 if (!host)
809 MakeHost(host, 0);
810 if (host)
812 host->family = FamilyLocalHost;
813 host->len = 0;
814 acopy("", host->addr, 0);
815 host->next = selfhosts;
816 selfhosts = host;
828 register HOST *host;
833 for (host = selfhosts; host; host = host->next)
835 if (addrEqual(family, addr, len, host))
838 MakeHost(host,len)
839 if (!host)
841 host->family = family;
842 host->len = len;
843 acopy(addr, host->addr, len);
844 host->next = selfhosts;
845 selfhosts = host;
857 * host entries and not to flag the entries as being
866 register HOST *host;
890 while ((host = validhosts) != 0)
892 validhosts = host->next;
893 FreeHost (host);
1001 /* host name */
1030 /* Is client on the local host */
1037 register HOST *host;
1057 for (host = selfhosts; host; host = host->next)
1059 if (addrEqual (family, addr, alen, host)) {
1228 /* untrusted clients can't change host access */
1236 /* Add a host to the access control list. This is the external interface
1292 HOST *host;
1294 for (host = validhosts; host; host = host->next)
1295 if (family == host->family && func (host->addr, host->len, closure))
1300 /* Add a host to the access control list. This is the internal interface
1308 register HOST *host;
1310 for (host = validhosts; host; host = host->next)
1312 if (addrEqual (family, addr, len, host))
1316 for (host = selfhosts; host; host = host->next) {
1317 if (addrEqual (family, addr, len, host)) {
1318 host->requested = TRUE;
1323 MakeHost(host,len)
1324 if (!host)
1326 host->family = family;
1327 host->len = len;
1328 acopy(addr, host->addr, len);
1329 host->next = validhosts;
1330 validhosts = host;
1334 /* Remove a host from the access control list */
1344 register HOST *host, **prev;
1378 (host = *prev) && (!addrEqual (family, pAddr, len, host));
1379 prev = &host->next)
1381 if (host)
1383 *prev = host->next;
1384 FreeHost (host);
1400 register HOST *host;
1404 for (host = validhosts; host; host = host->next)
1407 n += pad_to_int32(host->len) + sizeof(xHostEntry);
1420 for (host = validhosts; host; host = host->next)
1422 len = host->len;
1425 ((xHostEntry *)ptr)->family = host->family;
1428 acopy (host->addr, ptr, len);
1477 /* Check if a host is not in the access control list.
1478 * Returns 1 if host is invalid, 0 if we've found it. */
1488 register HOST *selfhost, *host;
1505 for (host = validhosts; host; host=host->next)
1508 selfhost->len, host))
1515 for (host = validhosts; host; host = host->next)
1517 if (host->family == FamilyServerInterpreted) {
1518 if (siAddrMatch (family, addr, len, host, client)) {
1522 if (addrEqual (family, addr, len, host))
1595 * FamilyServerInterpreted host entry implementation
1597 * Supports an extensible system of host types which the server can interpret
1609 * future to enable loading additional host types, but that was not done for
1662 /* Checks to see if a host matches a server-interpreted host entry */
1664 siAddrMatch(int family, pointer addr, int len, HOST *host, ClientPtr client)
1671 valueString = (const char *) memchr(host->addr, '\0', host->len);
1674 if (strcmp((char *) host->addr, s->typeName) == 0) {
1675 addrlen = host->len - (strlen((char *)host->addr) + 1);
1684 host->addr, addrlen, addrlen, valueString + 1,
1741 * Hostname server-interpreted host type