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>
(cherry picked from commit 7470578520
)
This commit is contained in:
parent
4f3df05728
commit
1a87dbc2ce
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user