From 5f8a24fdf2fe657c986017605895c83552fb8025 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Thu, 29 Oct 2009 14:28:11 -0700 Subject: Fixup validDrawable usage --- hw/xfree86/dri2/dri2ext.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c index 35297a49e..55630993f 100644 --- a/hw/xfree86/dri2/dri2ext.c +++ b/hw/xfree86/dri2/dri2ext.c @@ -353,7 +353,8 @@ ProcDRI2SwapBuffers(ClientPtr client) REQUEST_SIZE_MATCH(xDRI2SwapBuffersReq); - if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + if (!validDrawable(client, stuff->drawable, + DixReadAccess | DixWriteAccess, &pDrawable, &status)) return status; target_msc = vals_to_card64(stuff->target_msc_lo, stuff->target_msc_hi); @@ -397,7 +398,8 @@ ProcDRI2GetMSC(ClientPtr client) REQUEST_SIZE_MATCH(xDRI2GetMSCReq); - if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + if (!validDrawable(client, stuff->drawable, DixReadAccess, &pDrawable, + &status)) return status; status = DRI2GetMSC(pDrawable, &ust, &msc, &sbc); @@ -426,7 +428,8 @@ ProcDRI2WaitMSC(ClientPtr client) REQUEST_SIZE_MATCH(xDRI2WaitMSCReq); - if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + if (!validDrawable(client, stuff->drawable, DixReadAccess, &pDrawable, + &status)) return status; target = vals_to_card64(stuff->target_msc_lo, stuff->target_msc_hi); @@ -466,7 +469,8 @@ ProcDRI2WaitSBC(ClientPtr client) REQUEST_SIZE_MATCH(xDRI2WaitSBCReq); - if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + if (!validDrawable(client, stuff->drawable, DixReadAccess, &pDrawable, + &status)) return status; target = vals_to_card64(stuff->target_sbc_lo, stuff->target_sbc_hi); -- cgit v1.2.3