I think this needs to assign something to result if a non-local client makes a local-only extension request, doesn't it? BadRequest, I think?
Also, you've changed whitespace styles relative to the surrounding code. Dispatch() is sort of internally consistent-ish at using tabs for each eight-space indent. Jamey On Tue, Jun 28, 2011 at 08:27:51PM +0100, Daniel Stone wrote: > Even though we hide local-only extensions from remote clients in the > extension list, make doubly sure they can't make a local-only request. > > Signed-off-by: Daniel Stone <[email protected]> > --- > dix/dispatch.c | 11 +++++++---- > 1 files changed, 7 insertions(+), 4 deletions(-) > > diff --git a/dix/dispatch.c b/dix/dispatch.c > index 192c8c3..835a4e4 100644 > --- a/dix/dispatch.c > +++ b/dix/dispatch.c > @@ -427,10 +427,13 @@ Dispatch(void) > if (result > (maxBigRequestSize << 2)) > result = BadLength; > else { > - result = XaceHookDispatch(client, MAJOROP); > - if (result == Success) > - result = (* client->requestVector[MAJOROP])(client); > - XaceHookAuditEnd(client, result); > + ExtensionEntry *ext = GetExtensionEntry(MAJOROP); > + if (!ext || !ext->localOnly || LocalClient(client)) { > + result = XaceHookDispatch(client, MAJOROP); > + if (result == Success) > + result = (* > client->requestVector[MAJOROP])(client); > + XaceHookAuditEnd(client, result); > + } > } > #ifdef XSERVER_DTRACE > XSERVER_REQUEST_DONE(LookupMajorName(MAJOROP), MAJOROP, > -- > 1.7.5.4 > > _______________________________________________ > [email protected]: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel
signature.asc
Description: Digital signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
