mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
XACE: Make the default window background state configurable per-window.
To recap: the original XC-SECURITY extension disallowed background "None" if the window was untrusted. XACE 1.0 preserved this check as a hook function. XACE pre-2.0 removed the hook and first abolished background "None entirely, then restored it as a global on/off switch in response to Bug #13683. Now it's back to being per-window, via a flag instead of a hook function.
This commit is contained in:
@@ -810,6 +810,11 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
||||
subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
|
||||
obj = dixLookupPrivate(&clients[cid]->devPrivates, stateKey);
|
||||
|
||||
/* disable background None for untrusted windows */
|
||||
if ((requested & DixCreateAccess) && (rec->rtype == RT_WINDOW))
|
||||
if (subj->haveState && subj->trustLevel != XSecurityClientTrusted)
|
||||
((WindowPtr)rec->res)->forcedBG = TRUE;
|
||||
|
||||
/* special checks for server-owned resources */
|
||||
if (cid == 0) {
|
||||
if (rec->rtype & RC_DRAWABLE)
|
||||
|
||||
Reference in New Issue
Block a user