[PATCH] [WIP] Still trying to fix DRS schema replication - help needed!

Andrew Bartlett abartlet at samba.org
Mon Apr 8 14:41:37 MDT 2013

On Mon, 2013-04-08 at 15:40 +0200, Stefan (metze) Metzmacher wrote:
> Hi Andrew,
> > From e504667ddb0de67ae07ac7ed130cfb558a453734 Mon Sep 17 00:00:00 2001
> > From: Andrew Bartlett <abartlet at samba.org>
> > Date: Sat, 17 Nov 2012 11:49:25 +1100
> > Subject: [PATCH 1/4] dsdb: Fix talloc issues in dsdb_schema_copy_shallow
> > 
> > The problem was that we did not clear these structure members before
> > we regenerated these values in schema_fill_constructed().  The
> > talloc_realloc() in the schema_fill_possible_inferiors() and
> > schema_fill_system_possible_inferiors() calls would then use the old
> > talloc parent (cls, a child of schema) not cls_copy (a child of
> > schema_copy).
> > 
> > We also did not take a reference to the original class, to ensure the
> > other pointers remained valid.
> > 
> > As well as altering the original values in cls, if in the meantime the
> > original talloc parent (schema) would go away, we would use memory
> > after free().  (This is how I found the issue).
> Why do you still keep this patch?
> This should be fixed with c2853f55fc603d4875bb1e50a1cbf409df0421ea
> and 1f673bf9209405dfa2593859bbc45d1c6dc2a960.

I feel better with the talloc reference due to the structure assignment,
and I wanted to focus on getting it working before I considered removing
it again (with the associated rebase pain).  As you might have noticed,
I've got to iteration 10 of different combinations of patches here, in
the hope of getting something to work at all!

> And I thought we've discussed this more than once already :-)

I know.

> I'll take a look at the rest in detail during the week.


Andrew Bartlett

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

More information about the samba-technical mailing list