Compare commits
4 Commits
master
...
submit/xre
Author | SHA1 | Date | |
---|---|---|---|
|
ceb834db55 | ||
|
c3d88faf74 | ||
|
ac0c94b8e6 | ||
|
0a6b5547c1 |
19
Xext/xres.c
19
Xext/xres.c
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
#include "dix/registry_priv.h"
|
#include "dix/registry_priv.h"
|
||||||
#include "os/client_priv.h"
|
#include "os/client_priv.h"
|
||||||
|
#include "Xext/xace.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
|
@ -230,10 +231,12 @@ ProcXResQueryClients(ClientPtr client)
|
||||||
num_clients = 0;
|
num_clients = 0;
|
||||||
for (i = 0; i < currentMaxClients; i++) {
|
for (i = 0; i < currentMaxClients; i++) {
|
||||||
if (clients[i]) {
|
if (clients[i]) {
|
||||||
|
if (XaceHookClientAccess(client, clients[i], DixReadAccess) == Success) {
|
||||||
current_clients[num_clients] = i;
|
current_clients[num_clients] = i;
|
||||||
num_clients++;
|
num_clients++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rep = (xXResQueryClientsReply) {
|
rep = (xXResQueryClientsReply) {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
|
@ -306,7 +309,9 @@ ProcXResQueryClientResources(ClientPtr client)
|
||||||
|
|
||||||
clientID = CLIENT_ID(stuff->xid);
|
clientID = CLIENT_ID(stuff->xid);
|
||||||
|
|
||||||
if ((clientID >= currentMaxClients) || !clients[clientID]) {
|
if ((clientID >= currentMaxClients) || !clients[clientID] ||
|
||||||
|
(XaceHookClientAccess(client, clients[clientID], DixReadAccess)
|
||||||
|
!= Success)) {
|
||||||
client->errorValue = stuff->xid;
|
client->errorValue = stuff->xid;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
|
@ -382,7 +387,9 @@ ProcXResQueryClientPixmapBytes(ClientPtr client)
|
||||||
|
|
||||||
clientID = CLIENT_ID(stuff->xid);
|
clientID = CLIENT_ID(stuff->xid);
|
||||||
|
|
||||||
if ((clientID >= currentMaxClients) || !clients[clientID]) {
|
if ((clientID >= currentMaxClients) || !clients[clientID] ||
|
||||||
|
(XaceHookClientAccess(client, clients[clientID], DixReadAccess)
|
||||||
|
!= Success)) {
|
||||||
client->errorValue = stuff->xid;
|
client->errorValue = stuff->xid;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
|
@ -539,7 +546,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;
|
||||||
|
@ -549,7 +558,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