xace: pass serverClient as default argument to dixChangeWindowProperty
instead of NullClient.
This commit is contained in:
parent
e1cc68add0
commit
84a066cc88
|
@ -1715,7 +1715,7 @@ SecurityCheckPropertyAccess(CallbackListPtr *pcbl, pointer unused,
|
|||
|
||||
/* if client trusted or window untrusted, allow operation */
|
||||
|
||||
if (!client || (TRUSTLEVEL(client) == XSecurityClientTrusted) ||
|
||||
if ((TRUSTLEVEL(client) == XSecurityClientTrusted) ||
|
||||
(TRUSTLEVEL(wClient(pWin)) != XSecurityClientTrusted) )
|
||||
return;
|
||||
|
||||
|
|
|
@ -1070,7 +1070,7 @@ XSELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
|||
char *propname = NameForAtom(rec->pProp->propertyName);
|
||||
|
||||
tclient = wClient(pWin);
|
||||
if (!client || !tclient || !HAVESTATE(tclient))
|
||||
if (!tclient || !HAVESTATE(tclient))
|
||||
return;
|
||||
|
||||
propsid = GetPropertySID(SID(tclient)->ctx, propname);
|
||||
|
@ -1235,13 +1235,15 @@ XSELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
|||
rc = avc_sid_to_context(SID(client), &ctx);
|
||||
if (rc < 0)
|
||||
FatalError("XSELinux: Failed to get security context!\n");
|
||||
rc = ChangeWindowProperty(pWin, atom_client_ctx, XA_STRING, 8,
|
||||
PropModeReplace, strlen(ctx), ctx, FALSE);
|
||||
rc = dixChangeWindowProperty(serverClient,
|
||||
pWin, atom_client_ctx, XA_STRING, 8,
|
||||
PropModeReplace, strlen(ctx), ctx, FALSE);
|
||||
freecon(ctx);
|
||||
}
|
||||
else
|
||||
rc = ChangeWindowProperty(pWin, atom_client_ctx, XA_STRING, 8,
|
||||
PropModeReplace, 10, "UNLABELED!", FALSE);
|
||||
rc = dixChangeWindowProperty(serverClient,
|
||||
pWin, atom_client_ctx, XA_STRING, 8,
|
||||
PropModeReplace, 10, "UNLABELED!", FALSE);
|
||||
if (rc != Success)
|
||||
FatalError("XSELinux: Failed to set context property on window!\n");
|
||||
} /* XSELinuxResourceState */
|
||||
|
|
|
@ -374,7 +374,7 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
|
|||
int mode, unsigned long len, pointer value,
|
||||
Bool sendevent)
|
||||
{
|
||||
return dixChangeWindowProperty(NullClient, pWin, property, type, format,
|
||||
return dixChangeWindowProperty(serverClient, pWin, property, type, format,
|
||||
mode, len, value, sendevent);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user