xselinux: Fix GetDrawableContext

M_DRAWABLE_PIXMAP is the lookup mask to dixLookupDrawable, and _not_ the
type value in the drawable itself.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Adam Jackson 2011-01-20 23:01:03 -05:00 committed by Keith Packard
parent be3be7580b
commit ac0a00a840
1 changed files with 2 additions and 4 deletions

View File

@ -231,13 +231,11 @@ ProcSELinuxGetDrawableContext(ClientPtr client)
REQUEST(SELinuxGetContextReq);
REQUEST_SIZE_MATCH(SELinuxGetContextReq);
rc = dixLookupDrawable(&pDraw, stuff->id, client,
M_WINDOW | M_DRAWABLE_PIXMAP,
DixGetAttrAccess);
rc = dixLookupDrawable(&pDraw, stuff->id, client, 0, DixGetAttrAccess);
if (rc != Success)
return rc;
if (pDraw->type == M_DRAWABLE_PIXMAP)
if (pDraw->type == DRAWABLE_PIXMAP)
privatePtr = &((PixmapPtr)pDraw)->devPrivates;
else
privatePtr = &((WindowPtr)pDraw)->devPrivates;