[PATCH] shm: Fix XACE labeling of shm pixmaps when Xinerama is active
Michel Dänzer
michel at daenzer.net
Tue Apr 14 23:38:45 PDT 2015
On 14.04.2015 04:02, Adam Jackson wrote:
> 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;
>
Brent Collins posted essentially the same fix about two weeks ago in
551C330C.9010608 at trustedcs.com:
http://lists.x.org/archives/xorg-devel/2015-April/046068.html
Can you guys work out how to get this in?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the xorg-devel
mailing list