mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-29 21:46:40 +00:00
xace: add hooks + new access codes: core protocol colormap requests
This commit is contained in:
parent
acc9a42c92
commit
d744df32a1
2 changed files with 134 additions and 103 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue