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