aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/access.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-08 09:32:47 +0100
committermarha <marha@users.sourceforge.net>2011-12-08 09:32:47 +0100
commitacd000667561cb9978ead7f14d4fbb97c1a8e727 (patch)
tree21668e5efeb08af34de6c679d4c46cc6fe5d7b64 /xorg-server/os/access.c
parent893624a6c15d4ee6cf1d46e4ad29282c72bee962 (diff)
parent5b178ff5a5f0b6e481cf9fd9749eb7ef9581c987 (diff)
downloadvcxsrv-acd000667561cb9978ead7f14d4fbb97c1a8e727.tar.gz
vcxsrv-acd000667561cb9978ead7f14d4fbb97c1a8e727.tar.bz2
vcxsrv-acd000667561cb9978ead7f14d4fbb97c1a8e727.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'xorg-server/os/access.c')
-rw-r--r--xorg-server/os/access.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/xorg-server/os/access.c b/xorg-server/os/access.c
index d8fd7e48a..c7ff245d8 100644
--- a/xorg-server/os/access.c
+++ b/xorg-server/os/access.c
@@ -106,7 +106,7 @@ SOFTWARE.
#include <netinet/in.h>
#endif /* TCPCONN || STREAMSCONN */
-#ifdef HAS_GETPEERUCRED
+#ifdef HAVE_GETPEERUCRED
# include <ucred.h>
# ifdef sun
# include <zone.h>
@@ -146,7 +146,7 @@ SOFTWARE.
#endif
#endif
-#ifdef HAS_GETIFADDRS
+#ifdef HAVE_GETIFADDRS
#include <ifaddrs.h>
#endif
@@ -665,7 +665,7 @@ in6_fillscopeid(struct sockaddr_in6 *sin6)
void
DefineSelf (int fd)
{
-#ifndef HAS_GETIFADDRS
+#ifndef HAVE_GETIFADDRS
char *cp, *cplim;
# ifdef USE_SIOCGLIFCONF
struct sockaddr_storage buf[16];
@@ -680,7 +680,7 @@ DefineSelf (int fd)
register struct ifreq *ifr;
# endif
void * bufptr = buf;
-#else /* HAS_GETIFADDRS */
+#else /* HAVE_GETIFADDRS */
struct ifaddrs * ifap, *ifr;
#endif
int len;
@@ -688,7 +688,7 @@ DefineSelf (int fd)
int family;
register HOST *host;
-#ifndef HAS_GETIFADDRS
+#ifndef HAVE_GETIFADDRS
len = sizeof(buf);
@@ -859,7 +859,7 @@ DefineSelf (int fd)
}
if (bufptr != buf)
free(bufptr);
-#else /* HAS_GETIFADDRS */
+#else /* HAVE_GETIFADDRS */
if (getifaddrs(&ifap) < 0) {
ErrorF("Warning: getifaddrs returns %s\n", strerror(errno));
return;
@@ -947,7 +947,7 @@ DefineSelf (int fd)
} /* for */
freeifaddrs(ifap);
-#endif /* HAS_GETIFADDRS */
+#endif /* HAVE_GETIFADDRS */
/*
* add something of FamilyLocalHost
@@ -968,7 +968,7 @@ DefineSelf (int fd)
}
}
}
-#endif /* hpux && !HAS_IFREQ */
+#endif /* hpux && !HAVE_IFREQ */
#ifdef XDMCP
void
@@ -1266,14 +1266,14 @@ LocalClientCred(ClientPtr client, int *pUid, int *pGid)
int
GetLocalClientCreds(ClientPtr client, LocalClientCredRec **lccp)
{
-#if defined(HAS_GETPEEREID) || defined(HAS_GETPEERUCRED) || defined(SO_PEERCRED)
+#if defined(HAVE_GETPEEREID) || defined(HAVE_GETPEERUCRED) || defined(SO_PEERCRED)
int fd;
XtransConnInfo ci;
LocalClientCredRec *lcc;
-#ifdef HAS_GETPEEREID
+#ifdef HAVE_GETPEEREID
uid_t uid;
gid_t gid;
-#elif defined(HAS_GETPEERUCRED)
+#elif defined(HAVE_GETPEERUCRED)
ucred_t *peercred = NULL;
const gid_t *gids;
#elif defined(SO_PEERCRED)
@@ -1284,7 +1284,7 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec **lccp)
if (client == NULL)
return -1;
ci = ((OsCommPtr)client->osPrivate)->trans_conn;
-#if !(defined(sun) && defined(HAS_GETPEERUCRED))
+#if !(defined(sun) && defined(HAVE_GETPEERUCRED))
/* Most implementations can only determine peer credentials for Unix
* domain sockets - Solaris getpeerucred can work with a bit more, so
* we just let it tell us if the connection type is supported or not
@@ -1300,7 +1300,7 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec **lccp)
lcc = *lccp;
fd = _XSERVTransGetConnectionNumber(ci);
-#ifdef HAS_GETPEEREID
+#ifdef HAVE_GETPEEREID
if (getpeereid(fd, &uid, &gid) == -1) {
FreeLocalClientCreds(lcc);
return -1;
@@ -1309,7 +1309,7 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec **lccp)
lcc->egid = gid;
lcc->fieldsSet = LCC_UID_SET | LCC_GID_SET;
return 0;
-#elif defined(HAS_GETPEERUCRED)
+#elif defined(HAVE_GETPEERUCRED)
if (getpeerucred(fd, &peercred) < 0) {
FreeLocalClientCreds(lcc);
return -1;