mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-08 21:10:16 +01:00
xace: provide creation-time resource hook call in CreateWindow().
This commit is contained in:
parent
99b220969f
commit
299ff4c829
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue