diff options
Diffstat (limited to 'xorg-server/os')
-rw-r--r-- | xorg-server/os/access.c | 27 | ||||
-rw-r--r-- | xorg-server/os/utils.c | 48 |
2 files changed, 0 insertions, 75 deletions
diff --git a/xorg-server/os/access.c b/xorg-server/os/access.c index 9fcf99a73..125f35f5f 100644 --- a/xorg-server/os/access.c +++ b/xorg-server/os/access.c @@ -1008,33 +1008,6 @@ ComputeLocalClient(ClientPtr client) } /* - * Return the uid and gid of a connected local client - * - * Used by XShm to test access rights to shared memory segments - */ -int -LocalClientCred(ClientPtr client, int *pUid, int *pGid) -{ - LocalClientCredRec *lcc; - int ret = GetLocalClientCreds(client, &lcc); - - if (ret == 0) { -#ifdef HAVE_GETZONEID /* only local if in the same zone */ - if ((lcc->fieldsSet & LCC_ZID_SET) && (lcc->zoneid != getzoneid())) { - FreeLocalClientCreds(lcc); - return -1; - } -#endif - if ((lcc->fieldsSet & LCC_UID_SET) && (pUid != NULL)) - *pUid = lcc->euid; - if ((lcc->fieldsSet & LCC_GID_SET) && (pGid != NULL)) - *pGid = lcc->egid; - FreeLocalClientCreds(lcc); - } - return ret; -} - -/* * Return the uid and all gids of a connected local client * Allocates a LocalClientCredRec - caller must call FreeLocalClientCreds * diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c index ed7581e1c..f3197430a 100644 --- a/xorg-server/os/utils.c +++ b/xorg-server/os/utils.c @@ -1090,24 +1090,6 @@ set_font_authorizations(char **authorizations, int *authlen, void *client) } void * -Xalloc(unsigned long amount) -{ - /* - * Xalloc used to return NULL when large amount of memory is requested. In - * order to catch the buggy callers this warning has been added, slated to - * removal by anyone who touches this code (or just looks at it) in 2011. - * - * -- Mikhail Gusarov - */ - if ((long) amount <= 0) - ErrorF("Warning: Xalloc: " - "requesting unpleasantly large amount of memory: %lu bytes.\n", - amount); - - return malloc(amount); -} - -void * XNFalloc(unsigned long amount) { void *ptr = malloc(amount); @@ -1118,12 +1100,6 @@ XNFalloc(unsigned long amount) } void * -Xcalloc(unsigned long amount) -{ - return calloc(1, amount); -} - -void * XNFcalloc(unsigned long amount) { void *ret = calloc(1, amount); @@ -1134,24 +1110,6 @@ XNFcalloc(unsigned long amount) } void * -Xrealloc(void *ptr, unsigned long amount) -{ - /* - * Xrealloc used to return NULL when large amount of memory is requested. In - * order to catch the buggy callers this warning has been added, slated to - * removal by anyone who touches this code (or just looks at it) in 2011. - * - * -- Mikhail Gusarov - */ - if ((long) amount <= 0) - ErrorF("Warning: Xrealloc: " - "requesting unpleasantly large amount of memory: %lu bytes.\n", - amount); - - return realloc(ptr, amount); -} - -void * XNFrealloc(void *ptr, unsigned long amount) { void *ret = realloc(ptr, amount); @@ -1161,12 +1119,6 @@ XNFrealloc(void *ptr, unsigned long amount) return ret; } -void -Xfree(void *ptr) -{ - free(ptr); -} - char * Xstrdup(const char *s) { |