mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-27 20:58:52 +00:00
xace: provide creation-time resource hook call in CreateWindow().
This commit is contained in:
@@ -729,6 +729,14 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
|
||||
|
||||
pWin->borderWidth = bw;
|
||||
|
||||
/* security creation/labeling check
|
||||
*/
|
||||
if (!XaceHook(XACE_RESOURCE_ACCESS, wid, RT_WINDOW, DixCreateAccess, pWin))
|
||||
{
|
||||
xfree(pWin);
|
||||
*error = BadAccess;
|
||||
return NullWindow;
|
||||
}
|
||||
/* can't let untrusted clients have background None windows;
|
||||
* they make it too easy to steal window contents
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user