The branch, master has been updated
via 3c20251... s4:ldb Fix segfault in ldbsearch store_referral callback
from 2689165... Change the credential handling so that we start with
maxmux creds, and then return to the client the number of credits per operation
that they asked for. This is a more sensible algorithm than just blindly
returning "20" on every reply, although we will probably still need more
changes to this going forward. Jeremy.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3c202519eccfa1922f315e2f2910d832016ad3f1
Author: Andrew Bartlett <[email protected]>
Date: Thu Feb 25 11:46:41 2010 +1100
s4:ldb Fix segfault in ldbsearch store_referral callback
sctx->refs_store was not initialised, and that made talloc_realloc
grumpy once we started actually returning referrals regularly from
Samba4's partitions module (0be57c747825737fa9d64411223e693b055b5f8f
by mdw).
We now just use talloc_zero() and forget about this manual
initialisation work. Tracking down use of uninitialised variables
with valgrind was the grand idea when this started, but in practice we
just get segfaults in unusual places.
Andrew Bartlett
-----------------------------------------------------------------------
Summary of changes:
source4/lib/ldb/tools/ldbsearch.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/lib/ldb/tools/ldbsearch.c
b/source4/lib/ldb/tools/ldbsearch.c
index 207b344..af0c12a 100644
--- a/source4/lib/ldb/tools/ldbsearch.c
+++ b/source4/lib/ldb/tools/ldbsearch.c
@@ -191,21 +191,16 @@ static int do_search(struct ldb_context *ldb,
req = NULL;
- sctx = talloc(ldb, struct search_context);
+ sctx = talloc_zero(ldb, struct search_context);
if (!sctx) return -1;
sctx->ldb = ldb;
sctx->sort = options->sorted;
- sctx->num_stored = 0;
- sctx->refs_stored = 0;
- sctx->store = NULL;
sctx->req_ctrls = ldb_parse_control_strings(ldb, sctx, (const char
**)options->controls);
if (options->controls != NULL && sctx->req_ctrls== NULL) {
printf("parsing controls failed: %s\n", ldb_errstring(ldb));
return -1;
}
- sctx->entries = 0;
- sctx->refs = 0;
if (basedn == NULL) {
basedn = ldb_get_default_basedn(ldb);
--
Samba Shared Repository