xace: add hooks + new access codes: core protocol colormap requests

This commit is contained in:
Eamon Walsh 2007-08-06 12:23:21 -04:00 • committed by Eamon Walsh
commit d744df32a1
2 changed files with 134 additions and 103 deletions

View file

@ -64,6 +64,7 @@ SOFTWARE.
#include "resource.h"
#include "windowstr.h"
#include "privates.h"
#include "xace.h"
extern XID clientErrorValue;
extern int colormapPrivateCount;
@ -412,6 +413,16 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
}
}
/*
* Security creation/labeling check
*/
i = XaceHook(XACE_RESOURCE_ACCESS, clients[client], mid, RT_COLORMAP,
DixCreateAccess, pmap);
if (i != Success) {
FreeResource(mid, RT_NONE);
return i;
}
if (!(*pScreen->CreateColormap)(pmap))
{
FreeResource (mid, RT_NONE);