summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorBrent Collins <bcollins@trustedcs.com>2015-05-07 15:10:19 -0400
committerAdam Jackson <ajax@redhat.com>2015-05-07 15:10:19 -0400
commit7470578520e90b6402b2509cd0c51fd4fd84849f (patch)
treea594580b46dd47bd1da10982fd21d3f2fd7a0626 /Xext
parentbcec9f867d19e954a46c2654a79782bff6c65fce (diff)
shm: Fix xselinux resource initialization for xinerama pixmaps
This is necessary to avoid a NULL pointer deference when the pixmap is used later. [ajax: massaged commit message, fixed it to compile] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89748 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Brent Collins <bcollins@trustedcs.com>
Diffstat (limited to 'Xext')
-rw-r--r--Xext/shm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Xext/shm.c b/Xext/shm.c
index 52d997425..b359a9035 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -971,6 +971,12 @@ ProcPanoramiXShmCreatePixmap(ClientPtr client)
stuff->offset);
if (pMap) {
+ result = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid,
+ RT_PIXMAP, pMap, RT_NONE, NULL, DixCreateAccess);
+ if (result != Success) {
+ pDraw->pScreen->DestroyPixmap(pMap);
+ return result;
+ }
dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc);
shmdesc->refcnt++;
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;