aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/access.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-01-15 21:37:10 +0100
committermarha <marha@users.sourceforge.net>2014-01-15 21:37:10 +0100
commitb7f01cb1f6cfd1ec301f650a073436c91ec614aa (patch)
tree1dbf32344313ad7e5884e6686251cad398a231fa /xorg-server/os/access.c
parent7b4b94b4449aec056c4c92f5cacc2f89a292a80e (diff)
parent1b0fcca503ae9cf2d462b60770f96c794dfbb27a (diff)
downloadvcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.tar.gz
vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.tar.bz2
vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.zip
Merge remote-tracking branch 'origin/released'
* origin/released: mesa xkeyboard-config xserver git update 15 jan 2014 randrproto libfontenc mesa xserver git update 10 Jan 2014 randsrproto fontconfig libX11 git update 6 Jan 2014 Conflicts: mesalib/src/glsl/builtin_functions.cpp mesalib/src/glsl/ir_builder.h xorg-server/Xext/xres.c xorg-server/dix/dispatch.c xorg-server/dix/dixfonts.c xorg-server/hw/xwin/wingc.c xorg-server/hw/xwin/winwindowswm.c xorg-server/include/gc.h xorg-server/os/access.c
Diffstat (limited to 'xorg-server/os/access.c')
-rwxr-xr-x[-rw-r--r--]xorg-server/os/access.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/xorg-server/os/access.c b/xorg-server/os/access.c
index c8e15cfea..62c3d9925 100644..100755
--- a/xorg-server/os/access.c
+++ b/xorg-server/os/access.c
@@ -186,7 +186,7 @@ Bool defeatAccessControl = FALSE;
static int ConvertAddr(struct sockaddr * /*saddr */ ,
int * /*len */ ,
- pointer * /*addr */ );
+ void ** /*addr */ );
static int CheckAddr(int /*family */ ,
const void * /*pAddr */ ,
@@ -230,7 +230,7 @@ static int ActiveInterfaces = 0;
void match_interface(u_long u_lQuery);
/* FamilyServerInterpreted implementation */
-static Bool siAddrMatch(int family, pointer addr, int len, HOST * host,
+static Bool siAddrMatch(int family, void *addr, int len, HOST * host,
ClientPtr client);
static int siCheckAddr(const char *addrString, int length);
static void siTypesInitialize(void);
@@ -340,7 +340,7 @@ DisableLocalHost(void)
for (self = selfhosts; self; self = self->next) {
if (!self->requested) /* Fix for XFree86 bug #156 */
(void) RemoveHost((ClientPtr) NULL, self->family, self->len,
- (pointer) self->addr);
+ (void *) self->addr);
}
}
@@ -550,7 +550,7 @@ CarryOnTheOldWay:
else if (i == j) continue;
else memcpy ( &(inetaddr->sin_addr), hp->h_addr_list[i], hp->h_length);
len = sizeof(saddr.sa);
- family = ConvertAddr(&(saddr.sa), &len, (pointer *) &addr);
+ family = ConvertAddr(&(saddr.sa), &len, (void **) &addr);
if ( family != -1 && family != FamilyLocal ) {
for (host = selfhosts;
host && !addrEqual (family, addr, len, host);
@@ -715,7 +715,7 @@ DefineSelf(int fd)
#define IFR_IFR_NAME ifr->ifr_name
#endif
- if (ifioctl(fd, IFC_IOCTL_REQ, (pointer) &ifc) < 0)
+ if (ifioctl(fd, IFC_IOCTL_REQ, (void *) &ifc) < 0)
ErrorF("Getting interface configuration (4): %s\n", strerror(errno));
cplim = (char *) IFC_IFC_REQ + IFC_IFC_LEN;
@@ -724,7 +724,7 @@ DefineSelf(int fd)
ifr = (ifr_type *) cp;
len = ifraddr_size(IFR_IFR_ADDR);
family = ConvertAddr((struct sockaddr *) &IFR_IFR_ADDR,
- &len, (pointer *) &addr);
+ &len, (void **) &addr);
if (family == -1 || family == FamilyLocal)
continue;
#if defined(IPv6) && defined(AF_INET6)
@@ -819,12 +819,12 @@ DefineSelf(int fd)
struct ifreq broad_req;
broad_req = *ifr;
- if (ifioctl(fd, SIOCGIFFLAGS, (pointer) &broad_req) != -1 &&
+ if (ifioctl(fd, SIOCGIFFLAGS, (void *) &broad_req) != -1 &&
(broad_req.ifr_flags & IFF_BROADCAST) &&
(broad_req.ifr_flags & IFF_UP)
) {
broad_req = *ifr;
- if (ifioctl(fd, SIOCGIFBRDADDR, (pointer) &broad_req) != -1)
+ if (ifioctl(fd, SIOCGIFBRDADDR, (void *) &broad_req) != -1)
broad_addr = broad_req.ifr_addr;
else
continue;
@@ -849,7 +849,7 @@ DefineSelf(int fd)
continue;
len = sizeof(*(ifr->ifa_addr));
family = ConvertAddr((struct sockaddr *) ifr->ifa_addr, &len,
- (pointer *) &addr);
+ (void **) &addr);
if (family == -1 || family == FamilyLocal)
continue;
#if defined(IPv6) && defined(AF_INET6)
@@ -945,13 +945,13 @@ DefineSelf(int fd)
#ifdef XDMCP
void
-AugmentSelf(pointer from, int len)
+AugmentSelf(void *from, int len)
{
int family;
- pointer addr;
+ void *addr;
register HOST *host;
- family = ConvertAddr(from, &len, (pointer *) &addr);
+ family = ConvertAddr(from, &len, (void **) &addr);
if (family == -1 || family == FamilyLocal)
return;
for (host = selfhosts; host; host = host->next) {
@@ -984,7 +984,7 @@ AddLocalHosts(void)
/* Reset access control list to initial hosts */
void
-ResetHosts(char *display)
+ResetHosts(const char *display)
{
register HOST *host;
char lhostname[120], ohostname[120];
@@ -1005,7 +1005,7 @@ ResetHosts(char *display)
} saddr;
#endif
int family = 0;
- pointer addr;
+ void *addr;
int len;
siTypesInitialize();
@@ -1102,7 +1102,7 @@ ResetHosts(char *display)
for (a = addresses; a != NULL; a = a->ai_next) {
len = a->ai_addrlen;
f = ConvertAddr(a->ai_addr, &len,
- (pointer *) &addr);
+ (void **) &addr);
if ((family == f) ||
((family == FamilyWild) && (f != -1))) {
NewHost(f, addr, len, FALSE);
@@ -1125,15 +1125,15 @@ ResetHosts(char *display)
len = sizeof(saddr.sa);
if ((family =
ConvertAddr(&saddr.sa, &len,
- (pointer *) &addr)) != -1) {
+ (void **) &addr)) != -1) {
#ifdef h_addr /* new 4.3bsd version of gethostent */
char **list;
/* iterate over the addresses */
for (list = hp->h_addr_list; *list; list++)
- (void) NewHost(family, (pointer) *list, len, FALSE);
+ (void) NewHost(family, (void *) *list, len, FALSE);
#else
- (void) NewHost(family, (pointer) hp->h_addr, len,
+ (void) NewHost(family, (void *) hp->h_addr, len,
FALSE);
#endif
}
@@ -1153,7 +1153,7 @@ ComputeLocalClient(ClientPtr client)
{
int alen, family, notused;
Xtransaddr *from = NULL;
- pointer addr;
+ void *addr;
register HOST *host;
OsCommPtr oc = (OsCommPtr) client->osPrivate;
@@ -1162,7 +1162,7 @@ ComputeLocalClient(ClientPtr client)
if (!_XSERVTransGetPeerAddr(oc->trans_conn, &notused, &alen, &from)) {
family = ConvertAddr((struct sockaddr *) from,
- &alen, (pointer *) &addr);
+ &alen, (void **) &addr);
if (family == -1) {
free(from);
return FALSE;
@@ -1394,8 +1394,8 @@ AddHost(ClientPtr client, int family, unsigned length, /* of bytes in pAddr */
Bool
ForEachHostInFamily(int family, Bool (*func) (unsigned char * /* addr */ ,
short /* len */ ,
- pointer /* closure */ ),
- pointer closure)
+ void */* closure */ ),
+ void *closure)
{
HOST *host;
@@ -1441,7 +1441,7 @@ NewHost(int family, const void *addr, int len, int addingLocalHosts)
int
RemoveHost(ClientPtr client, int family, unsigned length, /* of bytes in pAddr */
- pointer pAddr)
+ void *pAddr)
{
int rc, len;
register HOST *host, **prev;
@@ -1488,7 +1488,7 @@ RemoveHost(ClientPtr client, int family, unsigned length, /* of bytes in p
/* Get all hosts in the access control list */
int
-GetHosts(pointer *data, int *pnHosts, int *pLen, BOOL * pEnabled)
+GetHosts(void **data, int *pnHosts, int *pLen, BOOL * pEnabled)
{
int len;
register int n = 0;
@@ -1563,12 +1563,12 @@ int
InvalidHost(register struct sockaddr *saddr, int len, ClientPtr client)
{
int family;
- pointer addr;
+ void *addr;
register HOST *selfhost, *host;
if (!AccessEnabled) /* just let them in */
return 0;
- family = ConvertAddr(saddr, &len, (pointer *) &addr);
+ family = ConvertAddr(saddr, &len, (void **) &addr);
if (family == -1)
return 1;
if (family == FamilyLocal) {
@@ -1604,7 +1604,7 @@ InvalidHost(register struct sockaddr *saddr, int len, ClientPtr client)
}
static int
-ConvertAddr(register struct sockaddr *saddr, int *len, pointer *addr)
+ConvertAddr(register struct sockaddr *saddr, int *len, void **addr)
{
if (*len == 0)
return FamilyLocal;
@@ -1621,7 +1621,7 @@ ConvertAddr(register struct sockaddr *saddr, int *len, pointer *addr)
return FamilyLocal;
#endif
*len = sizeof(struct in_addr);
- *addr = (pointer) &(((struct sockaddr_in *) saddr)->sin_addr);
+ *addr = (void *) &(((struct sockaddr_in *) saddr)->sin_addr);
return FamilyInternet;
#if defined(IPv6) && defined(AF_INET6)
case AF_INET6:
@@ -1630,12 +1630,12 @@ ConvertAddr(register struct sockaddr *saddr, int *len, pointer *addr)
if (IN6_IS_ADDR_V4MAPPED(&(saddr6->sin6_addr))) {
*len = sizeof(struct in_addr);
- *addr = (pointer) &(saddr6->sin6_addr.s6_addr[12]);
+ *addr = (void *) &(saddr6->sin6_addr.s6_addr[12]);
return FamilyInternet;
}
else {
*len = sizeof(struct in6_addr);
- *addr = (pointer) &(saddr6->sin6_addr);
+ *addr = (void *) &(saddr6->sin6_addr);
return FamilyInternet6;
}
}
@@ -1682,7 +1682,7 @@ GetAccessControl(void)
* future to enable loading additional host types, but that was not done for
* the initial implementation.
*/
-typedef Bool (*siAddrMatchFunc) (int family, pointer addr, int len,
+typedef Bool (*siAddrMatchFunc) (int family, void *addr, int len,
const char *siAddr, int siAddrlen,
ClientPtr client, void *siTypePriv);
typedef int (*siCheckAddrFunc) (const char *addrString, int length,
@@ -1735,7 +1735,7 @@ siTypeAdd(const char *typeName, siAddrMatchFunc addrMatch,
/* Checks to see if a host matches a server-interpreted host entry */
static Bool
-siAddrMatch(int family, pointer addr, int len, HOST * host, ClientPtr client)
+siAddrMatch(int family, void *addr, int len, HOST * host, ClientPtr client)
{
Bool matches = FALSE;
struct siType *s;
@@ -1836,7 +1836,7 @@ siCheckAddr(const char *addrString, int length)
#endif
static Bool
-siHostnameAddrMatch(int family, pointer addr, int len,
+siHostnameAddrMatch(int family, void *addr, int len,
const char *siAddr, int siAddrLen, ClientPtr client,
void *typePriv)
{
@@ -1853,7 +1853,7 @@ siHostnameAddrMatch(int family, pointer addr, int len,
struct addrinfo *a;
struct addrinfo hints;
int f, hostaddrlen;
- pointer hostaddr;
+ void *hostaddr;
if (siAddrLen >= sizeof(hostname))
return FALSE;
@@ -1885,7 +1885,7 @@ siHostnameAddrMatch(int family, pointer addr, int len,
#endif
char hostname[SI_HOSTNAME_MAXLEN];
int f, hostaddrlen;
- pointer hostaddr;
+ void *hostaddr;
const char **addrlist;
if (siAddrLen >= sizeof(hostname))
@@ -1989,7 +1989,7 @@ siHostnameCheckAddr(const char *valueString, int length, void *typePriv)
#define SI_IPv6_MAXLEN INET6_ADDRSTRLEN
static Bool
-siIPv6AddrMatch(int family, pointer addr, int len,
+siIPv6AddrMatch(int family, void *addr, int len,
const char *siAddr, int siAddrlen, ClientPtr client,
void *typePriv)
{
@@ -2115,7 +2115,7 @@ siLocalCredGetId(const char *addr, int len, siLocalCredPrivPtr lcPriv, int *id)
}
static Bool
-siLocalCredAddrMatch(int family, pointer addr, int len,
+siLocalCredAddrMatch(int family, void *addr, int len,
const char *siAddr, int siAddrlen, ClientPtr client,
void *typePriv)
{