summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-05-11 16:34:48 -0700
committerKeith Packard <keithp@keithp.com>2015-05-11 16:34:48 -0700
commitc39c3a97508dc384c0757a0990c07b5d7b2fe97a (patch)
treecc9758e3d15a407c9f9f710b4596d34f50c4d5c9 /Xext
parent6b65e961894b9ed53066d22cfd218b12c3f361ca (diff)
parent7470578520e90b6402b2509cd0c51fd4fd84849f (diff)
Merge remote-tracking branch 'ajax/xserver-next'
Diffstat (limited to 'Xext')
-rw-r--r--Xext/shm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/Xext/shm.c b/Xext/shm.c
index db9d47450..b359a9035 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -260,7 +260,7 @@ ShmDestroyPixmap(PixmapPtr pPixmap)
pScreen->DestroyPixmap = ShmDestroyPixmap;
if (shmdesc)
- ShmDetachSegment(shmdesc, pPixmap->drawable.id);
+ ShmDetachSegment(shmdesc, 0);
return ret;
}
@@ -427,7 +427,7 @@ ProcShmAttach(ClientPtr client)
/*ARGSUSED*/ static int
ShmDetachSegment(void *value, /* must conform to DeleteType */
- XID shmseg)
+ XID unused)
{
ShmDescPtr shmdesc = (ShmDescPtr) value;
ShmDescPtr *prev;
@@ -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;