[Xcb] Re: new SELinux protocol reply problem

Barton C Massey bart at cs.pdx.edu
Sat Feb 24 11:06:00 PST 2007


In message <20070224175415.GA30883 at id.minilop.net> you wrote:
> On Sat, Feb 24, 2007 at 10:17:15AM -0600, Ted X Toth wrote:
> > The problem was that xcb in its' read_packet function expects replies to
> > be at least 32 bytes long. When I padded the reply the
> > protocol worked.
> > Admittedly I'm no xcb expert but this seems a bit broken and at the
> > least should be documented.
> 
> It's on the very first page of the X11 protocol specification. What more
> documentation do you want?

:-) It would be really helpful if there were a good X
extension-writers' guide, rather than just wacky random bits
of stuff lying around the internet and guesswork.  Is there
any?

Is there any reason XCB shouldn't accept short replies?  As
near as I can tell, violating the protocol spec in this
particular way shouldn't ought to hurt anything; JG
apparently agrees?  There might be an efficiency issue, I
guess, since I imagine we start with a 32-byte read now.

> > Maybe the xslt could flag when replies aren't long
> > enough?
> More automated validation would be nice, but your XML
> described a legitimate piece of X protocol that I don't
> want to reject.

Maybe we could reject this protocol unless some explicit
"short-reply" attribute were set in the XML?  I doubt this
will be the last time the problem occurs...

> I'm glad your code works now, anyway.

Likewise!

    Bart


More information about the Xcb mailing list