[PATCH] Messaging improvements and fixes needed for auth logging

Andrew Bartlett abartlet at samba.org
Mon Mar 20 20:55:37 UTC 2017


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.

Volker



More information about the samba-technical mailing list