Xres: XResQueryClientIds: enable security filtering
Pass each client we're considering to report through XaceHookClientAccess(), so security extensions have a chance to filter them out. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
750b65de69
commit
098008879b
|
@ -545,7 +545,9 @@ ConstructClientIds(ClientPtr client,
|
||||||
if (specs[specIdx].client == 0) {
|
if (specs[specIdx].client == 0) {
|
||||||
int c;
|
int c;
|
||||||
for (c = 0; c < currentMaxClients; ++c) {
|
for (c = 0; c < currentMaxClients; ++c) {
|
||||||
if (clients[c]) {
|
if (clients[c] &&
|
||||||
|
(XaceHookClientAccess(client, clients[c], DixReadAccess)
|
||||||
|
!= Success)) {
|
||||||
if (!ConstructClientIdValue(client, clients[c],
|
if (!ConstructClientIdValue(client, clients[c],
|
||||||
specs[specIdx].mask, ctx)) {
|
specs[specIdx].mask, ctx)) {
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
@ -555,7 +557,9 @@ ConstructClientIds(ClientPtr client,
|
||||||
} else {
|
} else {
|
||||||
int clientID = CLIENT_ID(specs[specIdx].client);
|
int clientID = CLIENT_ID(specs[specIdx].client);
|
||||||
|
|
||||||
if ((clientID < currentMaxClients) && clients[clientID]) {
|
if ((clientID < currentMaxClients) && clients[clientID] &&
|
||||||
|
(XaceHookClientAccess(client, clients[clientID], DixReadAccess)
|
||||||
|
!= Success)) {
|
||||||
if (!ConstructClientIdValue(client, clients[clientID],
|
if (!ConstructClientIdValue(client, clients[clientID],
|
||||||
specs[specIdx].mask, ctx)) {
|
specs[specIdx].mask, ctx)) {
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
|
Loading…
Reference in New Issue