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

Andrew Bartlett abartlet at samba.org
Tue Jan 8 14:58:53 MST 2013


On Tue, 2013-01-08 at 13:50 -0800, Jeremy Allison wrote:
> 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.

Thanks.  It should be the first patch in the series, to preserve the git
bisect.  (I like to do that when it is as simple a getting the patch
order right). 

Andrew Bartlett
-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list