summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-06-10 19:18:53 -0700
committerKeith Packard <keithp@keithp.com>2010-06-10 19:18:53 -0700
commit620ca54aaa0b363fcf68cec1bd6c37e68c988352 (patch)
treebee8393dfa6d7837ea426db1f562cf059db843cb /Xext
parentfd69234db004e98c663f5c6c4360d2cecaa8a4df (diff)
parent8ff9b502cfce3828f7855ffba7949d6ebee34031 (diff)
Merge remote branch 'alanc/master'
Diffstat (limited to 'Xext')
-rw-r--r--Xext/security.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Xext/security.c b/Xext/security.c
index b37339fa7..7eb95de74 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -805,7 +805,6 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
Mask allowed = SecurityResourceMask;
subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
- obj = dixLookupPrivate(&clients[cid]->devPrivates, stateKey);
/* disable background None for untrusted windows */
if ((requested & DixCreateAccess) && (rec->rtype == RT_WINDOW))
@@ -831,8 +830,11 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
allowed |= DixReadAccess;
}
- if (SecurityDoCheck(subj, obj, requested, allowed) == Success)
- return;
+ if (clients[cid] != NULL) {
+ obj = dixLookupPrivate(&clients[cid]->devPrivates, stateKey);
+ if (SecurityDoCheck(subj, obj, requested, allowed) == Success)
+ return;
+ }
SecurityAudit("Security: denied client %d access %x to resource 0x%x "
"of client %d on request %s\n", rec->client->index,