[PATCH] shm: Fix XACE labeling of shm pixmaps when Xinerama is active
Adam Jackson
ajax at redhat.com
Mon Apr 13 12:02:07 PDT 2015
Which is to say, actually do label them, so that the data we're going to
need for access checks gets allocated, so we don't crash the next time
we touch the drawable.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
Xext/shm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Xext/shm.c b/Xext/shm.c
index db9d474..04ba10d 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;
--
2.1.0
More information about the xorg-devel
mailing list