diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-11-27 08:05:59 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-11-27 16:05:05 +1100 |
commit | e6c1608e909b9bbc1bdceeb24d57b9333c453a3d (patch) | |
tree | 8eec74759e4c9e3d8f2d2ede56743a94958a41bb /source4 | |
parent | 731f560ecb0d2c075a04eb4431275f9127b061b7 (diff) | |
download | samba-e6c1608e909b9bbc1bdceeb24d57b9333c453a3d.tar.gz samba-e6c1608e909b9bbc1bdceeb24d57b9333c453a3d.tar.bz2 samba-e6c1608e909b9bbc1bdceeb24d57b9333c453a3d.zip |
s4:dsdb Don't segfault with ldb_transaction_prepare_commit() without begin()
It is up to other modules to complain if
ldb_transaction_prepare_commit() is called before
ldb_transaction_begin_transaction()
Andrew Bartlett
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/linked_attributes.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c index 32f9cba8fe..bd9af5545e 100644 --- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c +++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c @@ -1212,6 +1212,10 @@ static int linked_attributes_prepare_commit(struct ldb_module *module) talloc_get_type(ldb_module_get_private(module), struct la_private); struct la_context *ac; + if (!la_private) { + /* prepare commit without begin_transaction - let someone else return the error, just don't segfault */ + return ldb_next_prepare_commit(module); + } /* walk the list backwards, to do the first entry first, as we * added the entries with DLIST_ADD() which puts them at the * start of the list */ |