[PATCH] Master fix for bug #9518 - conn->share_access appears not be be reset between users

Jeremy Allison jra at samba.org
Tue Jan 8 14:50:24 MST 2013


On Wed, Jan 09, 2013 at 08:39:30AM +1100, Andrew Bartlett wrote:
> 
> It's very odd that a NULL pointer de-reference would be
> platform-specific, but that's why I included the backtrace.  That said,
> I totally misread it last night. :-)
> 
> > So the issue is with conn->vuid_cache == NULL because conn_new()
> > isn't being called inside create_conn_struct() ?
> 
> Correct.
> 
> That is my analysis, and what I fixed in the patch I attached.

Ok, so this is only for master (as that's where the vuid_cache
change to a pointer went in). All other places where we do a
talloc_zero(NULL, connection_struct) need fixing too, but
that's relatively easy (here are all the places):

git grep 'talloc_zero.*connection_struct'
source3/smbd/conn.c:    if (!(conn=talloc_zero(NULL, connection_struct)) ||
source3/smbd/msdfs.c:   conn = talloc_zero(ctx, connection_struct);
source3/smbd/posix_acls.c:      conn = talloc_zero(frame, connection_struct);
source3/smbd/pysmbd.c:          conn = talloc_zero(mem_ctx, connection_struct);
source3/torture/vfstest.c:      vfs->conn = talloc_zero(vfs, connection_struct);

So let me add in your fix, plus one to change all these places
to call create_conn_struct() instead of allocating directly !

I'll post an updated patch shortly.

Cheers,

	Jeremy.


More information about the samba-technical mailing list