xace: add hooks + new access codes: APPGROUP extension

This commit is contained in:
Eamon Walsh 2007-09-20 12:17:17 -04:00 committed by Eamon Walsh
parent 82f7195a62
commit f6532a81ee

View File

@ -345,7 +345,7 @@ int AttrValidate(
ColormapPtr pColormap; ColormapPtr pColormap;
rc = dixLookupWindow(&pWin, pAppGrp->default_root, client, rc = dixLookupWindow(&pWin, pAppGrp->default_root, client,
DixUnknownAccess); DixGetAttrAccess);
if (rc != Success) if (rc != Success)
return rc; return rc;
pScreen = pWin->drawable.pScreen; pScreen = pWin->drawable.pScreen;
@ -367,8 +367,10 @@ int AttrValidate(
} }
if (pAppGrp->default_colormap) { if (pAppGrp->default_colormap) {
pColormap = (ColormapPtr)LookupIDByType (pAppGrp->default_colormap, RT_COLORMAP); rc = dixLookupResource((pointer *)&pColormap, pAppGrp->default_colormap,
/* XXX check that pColormap is not NULL */ RT_COLORMAP, client, DixUseAccess);
if (rc != Success)
return rc;
if (pColormap->pScreen != pScreen) if (pColormap->pScreen != pScreen)
return BadColor; return BadColor;
if (pColormap->pVisual->vid != (pAppGrp->root_visual ? pAppGrp->root_visual : pScreen->rootVisual)) if (pColormap->pVisual->vid != (pAppGrp->root_visual ? pAppGrp->root_visual : pScreen->rootVisual))
@ -470,7 +472,7 @@ int ProcXagQuery(
int n, rc; int n, rc;
REQUEST_SIZE_MATCH (xXagQueryReq); REQUEST_SIZE_MATCH (xXagQueryReq);
rc = dixLookupClient(&pClient, stuff->resource, client, DixUnknownAccess); rc = dixLookupClient(&pClient, stuff->resource, client, DixGetAttrAccess);
if (rc != Success) if (rc != Success)
return rc; return rc;