[PATCH] Messaging improvements and fixes needed for auth logging

Volker Lendecke vl at samba.org
Mon Mar 20 20:52:04 UTC 2017


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
uint8_t* that is returned. There I would assume the caller to be smart
and understand this is basically a blob.

Volker



More information about the samba-technical mailing list