summaryrefslogtreecommitdiff
path: root/Xext/sync.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-09-20 08:41:26 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-09-20 09:14:09 -0400
commit661b1328cf992d8855552677a94d60de1d8ce942 (patch)
treeba13da20f446d7052aa0f3f474b0b34a076f262c /Xext/sync.c
parent90bacdef723e1e49c72775144916750758d3568c (diff)
xace: add hooks + new access codes: SYNC extension
May need to revisit this extension in the future, depending on observed use.
Diffstat (limited to 'Xext/sync.c')
-rw-r--r--Xext/sync.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Xext/sync.c b/Xext/sync.c
index d9b6a9f06..81b0cc4aa 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -433,18 +433,18 @@ SyncInitTrigger(client, pTrigger, counter, changes)
Mask changes;
{
SyncCounter *pCounter = pTrigger->pCounter;
- int status;
+ int rc;
Bool newcounter = FALSE;
if (changes & XSyncCACounter)
{
if (counter == None)
pCounter = NULL;
- else if (!(pCounter = (SyncCounter *)SecurityLookupIDByType(
- client, counter, RTCounter, DixReadAccess)))
+ else if (Success != (rc = dixLookupResource((pointer *)&pCounter,
+ counter, RTCounter, client, DixReadAccess)))
{
client->errorValue = counter;
- return SyncErrorBase + XSyncBadCounter;
+ return (rc == BadValue) ? SyncErrorBase + XSyncBadCounter : rc;
}
if (pCounter != pTrigger->pCounter)
{ /* new counter for trigger */
@@ -526,8 +526,8 @@ SyncInitTrigger(client, pTrigger, counter, changes)
*/
if (newcounter)
{
- if ((status = SyncAddTriggerToCounter(pTrigger)) != Success)
- return status;
+ if ((rc = SyncAddTriggerToCounter(pTrigger)) != Success)
+ return rc;
}
else if (IsSystemCounter(pCounter))
{
@@ -1465,7 +1465,7 @@ ProcSyncSetPriority(client)
priorityclient = client;
else {
rc = dixLookupClient(&priorityclient, stuff->id, client,
- DixUnknownAccess);
+ DixSetAttrAccess);
if (rc != Success)
return rc;
}
@@ -1502,7 +1502,7 @@ ProcSyncGetPriority(client)
priorityclient = client;
else {
rc = dixLookupClient(&priorityclient, stuff->id, client,
- DixUnknownAccess);
+ DixGetAttrAccess);
if (rc != Success)
return rc;
}