summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-10-23 14:58:09 +1100
committerAndrew Tridgell <tridge@samba.org>2009-10-23 15:43:03 +1100
commite34106ca8b001d75182975a89145ded75dc6619d (patch)
tree55bf0ae2d41e1465eaada7f9d7c6bc48b9dfbdfb
parentb6200e3047b6ad0cc67922c9b3958af930c7aaeb (diff)
downloadsamba-e34106ca8b001d75182975a89145ded75dc6619d.tar.gz
samba-e34106ca8b001d75182975a89145ded75dc6619d.tar.bz2
samba-e34106ca8b001d75182975a89145ded75dc6619d.zip
s4:dsdb 'attrs' must be static (otherwise segv with async)
The async code makes this really easy to mess up... Andrew Bartlett
-rw-r--r--source4/dsdb/samdb/ldb_modules/new_partition.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/new_partition.c b/source4/dsdb/samdb/ldb_modules/new_partition.c
index c497d97aa5..47394f4e06 100644
--- a/source4/dsdb/samdb/ldb_modules/new_partition.c
+++ b/source4/dsdb/samdb/ldb_modules/new_partition.c
@@ -151,7 +151,8 @@ static int new_partition_add(struct ldb_module *module, struct ldb_request *req)
if (!ldb_msg_find_element(req->op.add.message, "instanceType")) {
return ldb_next_request(module, req);
} else {
- const char *no_attrs[] = { NULL };
+ /* This needs to be 'static' to ensure it does not move, and is not on the stack */
+ static const char *no_attrs[] = { NULL };
unsigned int instanceType = ldb_msg_find_attr_as_uint(req->op.add.message, "instanceType", 0);
if (!(instanceType & INSTANCE_TYPE_IS_NC_HEAD)) {
return ldb_next_request(module, req);