Lines Matching refs:host

193 #define addrEqual(fam, address, length, host) \
194 ((fam) == (host)->family &&\
195 (length) == (host)->len &&\
196 !memcmp (address, (host)->addr, length))
216 local host entries when stronger authentication is turned on. */
247 static Bool siAddrMatch(int family, void *addr, int len, HOST * host,
254 * local host to the access list
428 * Define this host for access control. Find all the hosts the OS knows about
443 register HOST *host;
503 for (host = selfhosts;
504 host && !addrEqual(family, addr, len, host);
505 host = host->next);
506 if (!host) {
507 /* add this host to the host list. */
508 MakeHost(host, len)
509 if (host) {
510 host->family = family;
511 host->len = len;
512 memcpy(host->addr, addr, len);
513 host->next = selfhosts;
514 selfhosts = host;
547 * now add a host of family FamilyLocalHost...
550 for (host = selfhosts;
551 host && !addrEqual(FamilyLocalHost, "", 0, host); host = host->next);
552 if (!host) {
553 MakeHost(host, 0);
554 if (host) {
555 host->family = FamilyLocalHost;
556 host->len = 0;
557 /* Nothing to store in host->addr */
558 host->next = selfhosts;
559 selfhosts = host;
623 register HOST *host;
680 for (host = selfhosts;
681 host && !addrEqual(family, addr, len, host); host = host->next);
682 if (host)
684 MakeHost(host, len)
685 if (host) {
686 host->family = family;
687 host->len = len;
688 memcpy(host->addr, addr, len);
689 host->next = selfhosts;
690 selfhosts = host;
806 for (host = selfhosts;
807 host != NULL && !addrEqual(family, addr, len, host);
808 host = host->next);
809 if (host != NULL)
811 MakeHost(host, len);
812 if (host != NULL) {
813 host->family = family;
814 host->len = len;
815 memcpy(host->addr, addr, len);
816 host->next = selfhosts;
817 selfhosts = host;
877 for (host = selfhosts;
878 host && !addrEqual(FamilyLocalHost, "", 0, host); host = host->next);
879 if (!host) {
880 MakeHost(host, 0);
881 if (host) {
882 host->family = FamilyLocalHost;
883 host->len = 0;
884 /* Nothing to store in host->addr */
885 host->next = selfhosts;
886 selfhosts = host;
898 register HOST *host;
903 for (host = selfhosts; host; host = host->next) {
904 if (addrEqual(family, addr, len, host))
907 MakeHost(host, len)
908 if (!host)
910 host->family = family;
911 host->len = len;
912 memcpy(host->addr, addr, len);
913 host->next = selfhosts;
914 selfhosts = host;
926 * host entries and not to flag the entries as being
935 register HOST *host;
959 while ((host = validhosts) != 0) {
960 validhosts = host->next;
961 FreeHost(host);
1060 /* host name */
1096 register HOST *host;
1113 for (host = selfhosts; host; host = host->next) {
1114 if (addrEqual(family, addr, alen, host)) {
1124 /* Is client on the local host */
1134 * is forwarded from another host via SSH
1301 /* untrusted clients can't change host access */
1309 /* Add a host to the access control list. This is the external interface
1360 HOST *host;
1362 for (host = validhosts; host; host = host->next)
1363 if (family == host->family && func(host->addr, host->len, closure))
1368 /* Add a host to the access control list. This is the internal interface
1373 register HOST *host;
1375 for (host = validhosts; host; host = host->next) {
1376 if (addrEqual(family, addr, len, host))
1380 for (host = selfhosts; host; host = host->next) {
1381 if (addrEqual(family, addr, len, host)) {
1382 host->requested = TRUE;
1387 MakeHost(host, len)
1388 if (!host)
1390 host->family = family;
1391 host->len = len;
1392 memcpy(host->addr, addr, len);
1393 host->next = validhosts;
1394 validhosts = host;
1398 /* Remove a host from the access control list */
1405 register HOST *host, **prev;
1440 (host = *prev) && (!addrEqual(family, pAddr, len, host));
1441 prev = &host->next);
1442 if (host) {
1443 *prev = host->next;
1444 FreeHost(host);
1456 register HOST *host;
1460 for (host = validhosts; host; host = host->next) {
1462 n += pad_to_int32(host->len) + sizeof(xHostEntry);
1473 for (host = validhosts; host; host = host->next) {
1474 len = host->len;
1477 ((xHostEntry *) ptr)->family = host->family;
1480 memcpy(ptr, host->addr, len);
1525 /* Check if a host is not in the access control list.
1526 * Returns 1 if host is invalid, 0 if we've found it. */
1533 register HOST *selfhost, *host;
1547 for (host = validhosts; host; host = host->next) {
1549 selfhost->len, host))
1557 for (host = validhosts; host; host = host->next) {
1558 if (host->family == FamilyServerInterpreted) {
1559 if (siAddrMatch(family, addr, len, host, client)) {
1564 if (addr && addrEqual(family, addr, len, host))
1648 * FamilyServerInterpreted host entry implementation
1650 * Supports an extensible system of host types which the server can interpret
1662 * future to enable loading additional host types, but that was not done for
1716 /* Checks to see if a host matches a server-interpreted host entry */
1718 siAddrMatch(int family, void *addr, int len, HOST * host, ClientPtr client)
1725 valueString = (const char *) memchr(host->addr, '\0', host->len);
1728 if (strcmp((char *) host->addr, s->typeName) == 0) {
1729 addrlen = host->len - (strlen((char *) host->addr) + 1);
1738 host->addr, addrlen, addrlen, valueString + 1,
1796 * Hostname server-interpreted host type