os: Clean up various xtrans bits that we've never supported
Or at least, not supported since xserver 1.0. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
23229c7ce5
commit
e2ada55de3
137
os/access.c
137
os/access.c
|
@ -104,11 +104,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(__SCO__)
|
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(__SCO__)
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif /* TCPCONN || STREAMSCONN || ISC || __SCO__ */
|
#endif /* TCPCONN || STREAMSCONN || __SCO__ */
|
||||||
#ifdef DNETCONN
|
|
||||||
#include <netdnet/dn.h>
|
|
||||||
#include <netdnet/dnetdb.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAS_GETPEERUCRED
|
#ifdef HAS_GETPEERUCRED
|
||||||
# include <ucred.h>
|
# include <ucred.h>
|
||||||
|
@ -333,7 +329,7 @@ ifioctl (int fd, int cmd, char *arg)
|
||||||
}
|
}
|
||||||
#else /* Case sun, SCO325 and others */
|
#else /* Case sun, SCO325 and others */
|
||||||
#define ifioctl ioctl
|
#define ifioctl ioctl
|
||||||
#endif /* ((SVR4 && !sun !SCO325) || ISC) && SIOCGIFCONF */
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DefineSelf (fd):
|
* DefineSelf (fd):
|
||||||
|
@ -346,7 +342,7 @@ ifioctl (int fd, int cmd, char *arg)
|
||||||
void
|
void
|
||||||
DefineSelf (int fd)
|
DefineSelf (int fd)
|
||||||
{
|
{
|
||||||
#if !defined(TCPCONN) && !defined(STREAMSCONN) && !defined(UNIXCONN) && !defined(MNX_TCPCONN)
|
#if !defined(TCPCONN) && !defined(STREAMSCONN) && !defined(UNIXCONN)
|
||||||
return;
|
return;
|
||||||
#else
|
#else
|
||||||
register int n;
|
register int n;
|
||||||
|
@ -480,7 +476,7 @@ DefineLocalHost:
|
||||||
selfhosts = host;
|
selfhosts = host;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* !TCPCONN && !STREAMSCONN && !UNIXCONN && !MNX_TCPCONN */
|
#endif /* !TCPCONN && !STREAMSCONN && !UNIXCONN */
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -545,35 +541,6 @@ DefineSelf (int fd)
|
||||||
int family;
|
int family;
|
||||||
register HOST *host;
|
register HOST *host;
|
||||||
|
|
||||||
#ifdef DNETCONN
|
|
||||||
struct dn_naddr *dnaddr = getnodeadd();
|
|
||||||
/*
|
|
||||||
* AF_DECnet may not be listed in the interface list. Instead use
|
|
||||||
* the supported library call to find out the local address (if any).
|
|
||||||
*/
|
|
||||||
if (dnaddr)
|
|
||||||
{
|
|
||||||
addr = (unsigned char *) dnaddr;
|
|
||||||
len = dnaddr->a_len + sizeof(dnaddr->a_len);
|
|
||||||
family = FamilyDECnet;
|
|
||||||
for (host = selfhosts;
|
|
||||||
host && !addrEqual (family, addr, len, host);
|
|
||||||
host = host->next)
|
|
||||||
;
|
|
||||||
if (!host)
|
|
||||||
{
|
|
||||||
MakeHost(host,len)
|
|
||||||
if (host)
|
|
||||||
{
|
|
||||||
host->family = family;
|
|
||||||
host->len = len;
|
|
||||||
acopy(addr, host->addr, len);
|
|
||||||
host->next = selfhosts;
|
|
||||||
selfhosts = host;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* DNETCONN */
|
|
||||||
#ifndef HAS_GETIFADDRS
|
#ifndef HAS_GETIFADDRS
|
||||||
|
|
||||||
len = sizeof(buf);
|
len = sizeof(buf);
|
||||||
|
@ -624,13 +591,6 @@ DefineSelf (int fd)
|
||||||
len = ifraddr_size (IFR_IFR_ADDR);
|
len = ifraddr_size (IFR_IFR_ADDR);
|
||||||
family = ConvertAddr ((struct sockaddr *) &IFR_IFR_ADDR,
|
family = ConvertAddr ((struct sockaddr *) &IFR_IFR_ADDR,
|
||||||
&len, (pointer *)&addr);
|
&len, (pointer *)&addr);
|
||||||
#ifdef DNETCONN
|
|
||||||
/*
|
|
||||||
* DECnet was handled up above.
|
|
||||||
*/
|
|
||||||
if (family == AF_DECnet)
|
|
||||||
continue;
|
|
||||||
#endif /* DNETCONN */
|
|
||||||
if (family == -1 || family == FamilyLocal)
|
if (family == -1 || family == FamilyLocal)
|
||||||
continue;
|
continue;
|
||||||
#if defined(IPv6) && defined(AF_INET6)
|
#if defined(IPv6) && defined(AF_INET6)
|
||||||
|
@ -760,10 +720,6 @@ DefineSelf (int fd)
|
||||||
for (ifr = ifap; ifr != NULL; ifr = ifr->ifa_next) {
|
for (ifr = ifap; ifr != NULL; ifr = ifr->ifa_next) {
|
||||||
if (!ifr->ifa_addr)
|
if (!ifr->ifa_addr)
|
||||||
continue;
|
continue;
|
||||||
#ifdef DNETCONN
|
|
||||||
if (ifr->ifa_addr.sa_family == AF_DECnet)
|
|
||||||
continue;
|
|
||||||
#endif /* DNETCONN */
|
|
||||||
len = sizeof(*(ifr->ifa_addr));
|
len = sizeof(*(ifr->ifa_addr));
|
||||||
family = ConvertAddr((struct sockaddr *) ifr->ifa_addr, &len,
|
family = ConvertAddr((struct sockaddr *) ifr->ifa_addr, &len,
|
||||||
(pointer *)&addr);
|
(pointer *)&addr);
|
||||||
|
@ -919,21 +875,14 @@ ResetHosts (char *display)
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
int i, hostlen;
|
int i, hostlen;
|
||||||
#if ((defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)) && \
|
#if (defined(TCPCONN) || defined(STREAMSCONN) ) && \
|
||||||
(!defined(IPv6) || !defined(AF_INET6))) || defined(DNETCONN)
|
(!defined(IPv6) || !defined(AF_INET6))
|
||||||
union {
|
union {
|
||||||
struct sockaddr sa;
|
struct sockaddr sa;
|
||||||
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
|
#if defined(TCPCONN) || defined(STREAMSCONN)
|
||||||
struct sockaddr_in in;
|
struct sockaddr_in in;
|
||||||
#endif /* TCPCONN || STREAMSCONN */
|
#endif /* TCPCONN || STREAMSCONN */
|
||||||
#ifdef DNETCONN
|
|
||||||
struct sockaddr_dn dn;
|
|
||||||
#endif
|
|
||||||
} saddr;
|
} saddr;
|
||||||
#endif
|
|
||||||
#ifdef DNETCONN
|
|
||||||
struct nodeent *np;
|
|
||||||
struct dn_naddr dnaddr, *dnaddrp, *dnet_addr();
|
|
||||||
#endif
|
#endif
|
||||||
int family = 0;
|
int family = 0;
|
||||||
pointer addr;
|
pointer addr;
|
||||||
|
@ -980,7 +929,7 @@ ResetHosts (char *display)
|
||||||
NewHost(family, "", 0, FALSE);
|
NewHost(family, "", 0, FALSE);
|
||||||
LocalHostRequested = TRUE; /* Fix for XFree86 bug #156 */
|
LocalHostRequested = TRUE; /* Fix for XFree86 bug #156 */
|
||||||
}
|
}
|
||||||
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
|
#if defined(TCPCONN) || defined(STREAMSCONN)
|
||||||
else if (!strncmp("inet:", lhostname, 5))
|
else if (!strncmp("inet:", lhostname, 5))
|
||||||
{
|
{
|
||||||
family = FamilyInternet;
|
family = FamilyInternet;
|
||||||
|
@ -994,13 +943,6 @@ ResetHosts (char *display)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef DNETCONN
|
|
||||||
else if (!strncmp("dnet:", lhostname, 5))
|
|
||||||
{
|
|
||||||
family = FamilyDECnet;
|
|
||||||
hostname = ohostname + 5;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#ifdef SECURE_RPC
|
#ifdef SECURE_RPC
|
||||||
else if (!strncmp("nis:", lhostname, 4))
|
else if (!strncmp("nis:", lhostname, 4))
|
||||||
{
|
{
|
||||||
|
@ -1024,32 +966,6 @@ ResetHosts (char *display)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#ifdef DNETCONN
|
|
||||||
if ((family == FamilyDECnet) || ((family == FamilyWild) &&
|
|
||||||
(ptr = strchr(hostname, ':')) && (*(ptr + 1) == ':') &&
|
|
||||||
!(*ptr = '\0'))) /* bash trailing colons if necessary */
|
|
||||||
{
|
|
||||||
/* node name (DECnet names end in "::") */
|
|
||||||
dnaddrp = dnet_addr(hostname);
|
|
||||||
if (!dnaddrp && (np = getnodebyname (hostname)))
|
|
||||||
{
|
|
||||||
/* node was specified by name */
|
|
||||||
saddr.sa.sa_family = np->n_addrtype;
|
|
||||||
len = sizeof(saddr.sa);
|
|
||||||
if (ConvertAddr (&saddr.sa, &len, (pointer *)&addr) == FamilyDECnet)
|
|
||||||
{
|
|
||||||
memset((char *) &dnaddr, 0, sizeof (dnaddr));
|
|
||||||
dnaddr.a_len = np->n_length;
|
|
||||||
acopy (np->n_addr, dnaddr.a_addr, np->n_length);
|
|
||||||
dnaddrp = &dnaddr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (dnaddrp)
|
|
||||||
(void) NewHost(FamilyDECnet, (pointer)dnaddrp,
|
|
||||||
(int)(dnaddrp->a_len + sizeof(dnaddrp->a_len)), FALSE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif /* DNETCONN */
|
|
||||||
#ifdef SECURE_RPC
|
#ifdef SECURE_RPC
|
||||||
if ((family == FamilyNetname) || (strchr(hostname, '@')))
|
if ((family == FamilyNetname) || (strchr(hostname, '@')))
|
||||||
{
|
{
|
||||||
|
@ -1058,7 +974,7 @@ ResetHosts (char *display)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif /* SECURE_RPC */
|
#endif /* SECURE_RPC */
|
||||||
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
|
#if defined(TCPCONN) || defined(STREAMSCONN)
|
||||||
{
|
{
|
||||||
#if defined(IPv6) && defined(AF_INET6)
|
#if defined(IPv6) && defined(AF_INET6)
|
||||||
if ( (family == FamilyInternet) || (family == FamilyInternet6) ||
|
if ( (family == FamilyInternet) || (family == FamilyInternet6) ||
|
||||||
|
@ -1523,7 +1439,7 @@ CheckAddr (
|
||||||
|
|
||||||
switch (family)
|
switch (family)
|
||||||
{
|
{
|
||||||
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
|
#if defined(TCPCONN) || defined(STREAMSCONN)
|
||||||
case FamilyInternet:
|
case FamilyInternet:
|
||||||
if (length == sizeof (struct in_addr))
|
if (length == sizeof (struct in_addr))
|
||||||
len = length;
|
len = length;
|
||||||
|
@ -1538,21 +1454,6 @@ CheckAddr (
|
||||||
len = -1;
|
len = -1;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
#ifdef DNETCONN
|
|
||||||
case FamilyDECnet:
|
|
||||||
{
|
|
||||||
struct dn_naddr *dnaddr = (struct dn_naddr *) pAddr;
|
|
||||||
|
|
||||||
if ((length < sizeof(dnaddr->a_len)) ||
|
|
||||||
(length < dnaddr->a_len + sizeof(dnaddr->a_len)))
|
|
||||||
len = -1;
|
|
||||||
else
|
|
||||||
len = dnaddr->a_len + sizeof(dnaddr->a_len);
|
|
||||||
if (len > sizeof(struct dn_naddr))
|
|
||||||
len = -1;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
case FamilyServerInterpreted:
|
case FamilyServerInterpreted:
|
||||||
len = siCheckAddr(pAddr, length);
|
len = siCheckAddr(pAddr, length);
|
||||||
|
@ -1631,7 +1532,7 @@ ConvertAddr (
|
||||||
case AF_UNIX:
|
case AF_UNIX:
|
||||||
#endif
|
#endif
|
||||||
return FamilyLocal;
|
return FamilyLocal;
|
||||||
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
|
#if defined(TCPCONN) || defined(STREAMSCONN)
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
if (16777343 == *(long*)&((struct sockaddr_in *) saddr)->sin_addr)
|
if (16777343 == *(long*)&((struct sockaddr_in *) saddr)->sin_addr)
|
||||||
|
@ -1655,22 +1556,6 @@ ConvertAddr (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
#ifdef DNETCONN
|
|
||||||
case AF_DECnet:
|
|
||||||
{
|
|
||||||
struct sockaddr_dn *sdn = (struct sockaddr_dn *) saddr;
|
|
||||||
*len = sdn->sdn_nodeaddrl + sizeof(sdn->sdn_nodeaddrl);
|
|
||||||
*addr = (pointer) &(sdn->sdn_add);
|
|
||||||
}
|
|
||||||
return FamilyDECnet;
|
|
||||||
#endif
|
|
||||||
#ifdef CHAOSCONN
|
|
||||||
case AF_CHAOS:
|
|
||||||
{
|
|
||||||
not implemented
|
|
||||||
}
|
|
||||||
return FamilyChaos;
|
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -113,9 +113,6 @@ SOFTWARE.
|
||||||
|
|
||||||
#define Pid_t pid_t
|
#define Pid_t pid_t
|
||||||
|
|
||||||
#ifdef DNETCONN
|
|
||||||
#include <netdnet/dn.h>
|
|
||||||
#endif /* DNETCONN */
|
|
||||||
|
|
||||||
#ifdef HAS_GETPEERUCRED
|
#ifdef HAS_GETPEERUCRED
|
||||||
# include <ucred.h>
|
# include <ucred.h>
|
||||||
|
@ -521,7 +518,7 @@ AuthAudit (ClientPtr client, Bool letin,
|
||||||
#endif
|
#endif
|
||||||
strcpy(out, "local host");
|
strcpy(out, "local host");
|
||||||
break;
|
break;
|
||||||
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
|
#if defined(TCPCONN) || defined(STREAMSCONN)
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
sprintf(out, "IP %s",
|
sprintf(out, "IP %s",
|
||||||
inet_ntoa(((struct sockaddr_in *) saddr)->sin_addr));
|
inet_ntoa(((struct sockaddr_in *) saddr)->sin_addr));
|
||||||
|
@ -535,12 +532,6 @@ AuthAudit (ClientPtr client, Bool letin,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
#ifdef DNETCONN
|
|
||||||
case AF_DECnet:
|
|
||||||
sprintf(out, "DN %s",
|
|
||||||
dnet_ntoa(&((struct sockaddr_dn *) saddr)->sdn_add));
|
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
strcpy(out, "unknown address");
|
strcpy(out, "unknown address");
|
||||||
|
|
|
@ -1520,7 +1520,7 @@ get_addr_by_name(
|
||||||
#ifdef XTHREADS_NEEDS_BYNAMEPARAMS
|
#ifdef XTHREADS_NEEDS_BYNAMEPARAMS
|
||||||
_Xgethostbynameparams hparams;
|
_Xgethostbynameparams hparams;
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32) && (defined(TCPCONN) || defined(DNETCONN))
|
#if defined(WIN32) && defined(TCPCONN)
|
||||||
_XSERVTransWSAStartup();
|
_XSERVTransWSAStartup();
|
||||||
#endif
|
#endif
|
||||||
if (!(hep = _XGethostbyname(namestr, hparams)))
|
if (!(hep = _XGethostbyname(namestr, hparams)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user