From 578026fcd58d12dd0be4c0976ee5ecf95a9d61f0 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 20 May 2014 12:43:59 -0400 Subject: os: Remove LocalClientCred The comment lies, shm hasn't used this code since: commit fdef7be5c8d5989e0aa453d0a5b86d0a6952e960 Author: Alan Coopersmith Date: Tue Oct 9 18:44:04 2007 -0700 Sun bug 6589829: include zoneid of shm segment in access [...] Reviewed-by: Alan Coopersmith Signed-off-by: Adam Jackson --- os/access.c | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'os') diff --git a/os/access.c b/os/access.c index 9fcf99a73..125f35f5f 100644 --- a/os/access.c +++ b/os/access.c @@ -1007,33 +1007,6 @@ ComputeLocalClient(ClientPtr client) return FALSE; } -/* - * 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 -- cgit v1.2.3