xace: add hooks + new access codes: SYNC extension
May need to revisit this extension in the future, depending on observed use.
This commit is contained in:
parent
90bacdef72
commit
661b1328cf
16
Xext/sync.c
16
Xext/sync.c
|
@ -433,18 +433,18 @@ SyncInitTrigger(client, pTrigger, counter, changes)
|
||||||
Mask changes;
|
Mask changes;
|
||||||
{
|
{
|
||||||
SyncCounter *pCounter = pTrigger->pCounter;
|
SyncCounter *pCounter = pTrigger->pCounter;
|
||||||
int status;
|
int rc;
|
||||||
Bool newcounter = FALSE;
|
Bool newcounter = FALSE;
|
||||||
|
|
||||||
if (changes & XSyncCACounter)
|
if (changes & XSyncCACounter)
|
||||||
{
|
{
|
||||||
if (counter == None)
|
if (counter == None)
|
||||||
pCounter = NULL;
|
pCounter = NULL;
|
||||||
else if (!(pCounter = (SyncCounter *)SecurityLookupIDByType(
|
else if (Success != (rc = dixLookupResource((pointer *)&pCounter,
|
||||||
client, counter, RTCounter, DixReadAccess)))
|
counter, RTCounter, client, DixReadAccess)))
|
||||||
{
|
{
|
||||||
client->errorValue = counter;
|
client->errorValue = counter;
|
||||||
return SyncErrorBase + XSyncBadCounter;
|
return (rc == BadValue) ? SyncErrorBase + XSyncBadCounter : rc;
|
||||||
}
|
}
|
||||||
if (pCounter != pTrigger->pCounter)
|
if (pCounter != pTrigger->pCounter)
|
||||||
{ /* new counter for trigger */
|
{ /* new counter for trigger */
|
||||||
|
@ -526,8 +526,8 @@ SyncInitTrigger(client, pTrigger, counter, changes)
|
||||||
*/
|
*/
|
||||||
if (newcounter)
|
if (newcounter)
|
||||||
{
|
{
|
||||||
if ((status = SyncAddTriggerToCounter(pTrigger)) != Success)
|
if ((rc = SyncAddTriggerToCounter(pTrigger)) != Success)
|
||||||
return status;
|
return rc;
|
||||||
}
|
}
|
||||||
else if (IsSystemCounter(pCounter))
|
else if (IsSystemCounter(pCounter))
|
||||||
{
|
{
|
||||||
|
@ -1465,7 +1465,7 @@ ProcSyncSetPriority(client)
|
||||||
priorityclient = client;
|
priorityclient = client;
|
||||||
else {
|
else {
|
||||||
rc = dixLookupClient(&priorityclient, stuff->id, client,
|
rc = dixLookupClient(&priorityclient, stuff->id, client,
|
||||||
DixUnknownAccess);
|
DixSetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -1502,7 +1502,7 @@ ProcSyncGetPriority(client)
|
||||||
priorityclient = client;
|
priorityclient = client;
|
||||||
else {
|
else {
|
||||||
rc = dixLookupClient(&priorityclient, stuff->id, client,
|
rc = dixLookupClient(&priorityclient, stuff->id, client,
|
||||||
DixUnknownAccess);
|
DixGetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user