[PATCH] Messaging improvements and fixes needed for auth logging

Volker Lendecke vl at samba.org
Mon Mar 20 21:20:17 UTC 2017


On Mon, Mar 20, 2017 at 09:55:37PM +0100, Andrew Bartlett via samba-technical wrote:
> On Mon, Mar 20, 2017 at 09:52:04PM +0100, Volker Lendecke via samba-technical wrote:
> > On Tue, Mar 21, 2017 at 09:02:10AM +1300, Andrew Bartlett wrote:
> > > > Can you explain a bit more what is going on here?
> > > 
> > > Certainly.  Have you run the test I've added?  (make test
> > > TESTS=messaging triggers it nicely). 
> > 
> > No, I haven't run the test. Can you explain in English words what the
> > bug is please?
> > 
> > > >  I would like to
> > > > avoid DATA_BLOB and/or TDB_DATA where it makes sense. Here we always
> > > > return a talloc'ed object that carries its own length. I think that a
> > > > talloc objects is just as expressive as a DATA_BLOB, you can always
> > > > query its length with talloc_get_size.
> > > > 
> > > > I would like to understand the bug that this fixes that is not
> > > > fixable
> > > > with keeping just the uint8_t* return from tdb_fetch_talloc().
> > > 
> > > The callers otherwise assumed it was a NULL terminated string, and
> > > wandered off the end of the string.  
> > 
> > I could understand that if talloc_get_size returned a char*. But it's a
>                              ^^^^^^^^^^^^^^^
>                              tdb_fetch_talloc of course :-)
> 
> tdb_fetch_talloc returns a uint8_t*, so a blob.

Unbelievable, I fooled with a wrong "From" line -- sorry for that. How
did I do that? :-)

Volker



More information about the samba-technical mailing list