The branch, master has been updated
via ccaab14 ldb: make the 'spy' code more paranoid
via 8d9665d s4-services: disable the web server by default
via 4d6c120 ldb: fixed ldbsearch when no baseDN specified and cross-ncs
is used
via 8ab3c84 pyldb: added OID_COMPARATOR constants
via 7dba93a wintest: update snapshots
from 786fe9f Fix bug 8429 - Compound SMB2 requests on an IPC connection
can corrupt the reply stream.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit ccaab14ac423025d1c3188c429832533f19479f1
Author: Andrew Tridgell <[email protected]>
Date: Thu Sep 1 14:28:10 2011 +1000
ldb: make the 'spy' code more paranoid
the spy code in ldb_tdb was added a while ago to overcome a memory
hierarchy problem with async ldb errors. Recently we started to get
valgrind errors related to the order of free in the spy code. This
patch ensures that we don't try to use a freed spy pointer. This
prevents the valgrind errors, although I suspect that the memory
hierarchy we have here is more complex than it needs to be
Pair-Programmed-With: Andrew Bartlett <[email protected]>
Autobuild-User: Andrew Tridgell <[email protected]>
Autobuild-Date: Thu Sep 1 08:54:23 CEST 2011 on sn-devel-104
commit 8d9665d5d15954cd36d1c385384520ce15ab4857
Author: Andrew Tridgell <[email protected]>
Date: Thu Sep 1 13:50:17 2011 +1000
s4-services: disable the web server by default
the web server is not being actively maintained, and is causing
problems with memory errors (as shown by valgrind). It is better to
disable this until it can get some TLC
Pair-Programmed-With: Andrew Bartlett <[email protected]>
commit 4d6c120fb7a9aef80e83f00b155ff93e96034897
Author: Andrew Tridgell <[email protected]>
Date: Wed Aug 31 16:17:54 2011 +1000
ldb: fixed ldbsearch when no baseDN specified and cross-ncs is used
Pair-Programmed-With: Andrew Bartlett <[email protected]>
commit 8ab3c843b1bf0f60a7d6b68411931d204b6f882b
Author: Andrew Tridgell <[email protected]>
Date: Wed Aug 31 15:55:27 2011 +1000
pyldb: added OID_COMPARATOR constants
This also changes the other constants to remove the LDB_ prefix, which
is redundent
Pair-Programmed-With: Andrew Bartlett <[email protected]>
commit 7dba93ac4170bfb17bbd579fa9578391e07667f0
Author: Andrew Bartlett <[email protected]>
Date: Tue Aug 30 09:02:01 2011 +1000
wintest: update snapshots
-----------------------------------------------------------------------
Summary of changes:
lib/ldb/ldb_tdb/ldb_tdb.c | 14 +++++++++++-
lib/ldb/ldb_tdb/ldb_tdb.h | 8 -------
lib/ldb/pyldb.c | 20 ++++++++++--------
lib/ldb/tools/ldbsearch.c | 28 +++++++++++++++++++++++---
source4/param/loadparm.c | 2 +-
source4/scripting/python/samba/dbchecker.py | 2 +-
wintest/conf/abartlet.conf | 10 ++++----
7 files changed, 54 insertions(+), 30 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/ldb/ldb_tdb/ldb_tdb.c b/lib/ldb/ldb_tdb/ldb_tdb.c
index f07a9d2..3630a18 100644
--- a/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -52,6 +52,12 @@
#include "ldb_tdb.h"
#include <lib/tdb_compat/tdb_compat.h>
+/*
+ prevent memory errors on callbacks
+*/
+struct ltdb_req_spy {
+ struct ltdb_context *ctx;
+};
/*
map a tdb error code to a ldb error code
@@ -1221,9 +1227,10 @@ static void ltdb_timeout(struct tevent_context *ev,
ltdb_request_done(ctx, LDB_ERR_TIME_LIMIT_EXCEEDED);
}
- if (!ctx->request_terminated) {
+ if (ctx->spy) {
/* neutralize the spy */
ctx->spy->ctx = NULL;
+ ctx->spy = NULL;
}
talloc_free(ctx);
}
@@ -1318,9 +1325,10 @@ static void ltdb_callback(struct tevent_context *ev,
}
done:
- if (!ctx->request_terminated) {
+ if (ctx->spy) {
/* neutralize the spy */
ctx->spy->ctx = NULL;
+ ctx->spy = NULL;
}
talloc_free(ctx);
}
@@ -1330,7 +1338,9 @@ static int ltdb_request_destructor(void *ptr)
struct ltdb_req_spy *spy = talloc_get_type(ptr, struct ltdb_req_spy);
if (spy->ctx != NULL) {
+ spy->ctx->spy = NULL;
spy->ctx->request_terminated = true;
+ spy->ctx = NULL;
}
return 0;
diff --git a/lib/ldb/ldb_tdb/ldb_tdb.h b/lib/ldb/ldb_tdb/ldb_tdb.h
index 96ad43f..29856bf 100644
--- a/lib/ldb/ldb_tdb/ldb_tdb.h
+++ b/lib/ldb/ldb_tdb/ldb_tdb.h
@@ -33,14 +33,6 @@ struct ltdb_private {
bool warn_unindexed;
};
-/*
- the async local context
- holds also internal search state during a full db search
-*/
-struct ltdb_req_spy {
- struct ltdb_context *ctx;
-};
-
struct ltdb_context {
struct ldb_module *module;
struct ldb_request *req;
diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c
index d456acb..40efbb5 100644
--- a/lib/ldb/pyldb.c
+++ b/lib/ldb/pyldb.c
@@ -3385,13 +3385,15 @@ void initldb(void)
PyModule_AddObject(m, "__version__",
PyString_FromString(PACKAGE_VERSION));
-#define ADD_LDB_STRING(val) PyModule_AddObject(m, #val,
PyString_FromString(val))
-
- ADD_LDB_STRING(LDB_SYNTAX_DN);
- ADD_LDB_STRING(LDB_SYNTAX_DN);
- ADD_LDB_STRING(LDB_SYNTAX_DIRECTORY_STRING);
- ADD_LDB_STRING(LDB_SYNTAX_INTEGER);
- ADD_LDB_STRING(LDB_SYNTAX_BOOLEAN);
- ADD_LDB_STRING(LDB_SYNTAX_OCTET_STRING);
- ADD_LDB_STRING(LDB_SYNTAX_UTC_TIME);
+#define ADD_LDB_STRING(val) PyModule_AddObject(m, #val,
PyString_FromString(LDB_## val))
+
+ ADD_LDB_STRING(SYNTAX_DN);
+ ADD_LDB_STRING(SYNTAX_DN);
+ ADD_LDB_STRING(SYNTAX_DIRECTORY_STRING);
+ ADD_LDB_STRING(SYNTAX_INTEGER);
+ ADD_LDB_STRING(SYNTAX_BOOLEAN);
+ ADD_LDB_STRING(SYNTAX_OCTET_STRING);
+ ADD_LDB_STRING(SYNTAX_UTC_TIME);
+ ADD_LDB_STRING(OID_COMPARATOR_AND);
+ ADD_LDB_STRING(OID_COMPARATOR_OR);
}
diff --git a/lib/ldb/tools/ldbsearch.c b/lib/ldb/tools/ldbsearch.c
index d10b965..2da7072 100644
--- a/lib/ldb/tools/ldbsearch.c
+++ b/lib/ldb/tools/ldbsearch.c
@@ -204,10 +204,6 @@ static int do_search(struct ldb_context *ldb,
return LDB_ERR_OPERATIONS_ERROR;
}
- if (basedn == NULL) {
- basedn = ldb_get_default_basedn(ldb);
- }
-
again:
/* free any previous requests */
if (req) talloc_free(req);
@@ -224,6 +220,30 @@ again:
return ret;
}
+ if (basedn == NULL) {
+ /*
+ we need to use a NULL base DN when doing a cross-ncs
+ search so we find results on all partitions in a
+ forest. When doing a domain-local search, default to
+ the default basedn
+ */
+ struct ldb_control *ctrl;
+ struct ldb_search_options_control *search_options = NULL;
+
+ ctrl = ldb_request_get_control(req,
LDB_CONTROL_SEARCH_OPTIONS_OID);
+ if (ctrl) {
+ search_options = talloc_get_type(ctrl->data, struct
ldb_search_options_control);
+ }
+
+ if (ctrl == NULL || search_options == NULL ||
+ !(search_options->search_options &
LDB_SEARCH_OPTION_PHANTOM_ROOT)) {
+ struct ldb_dn *base = ldb_get_default_basedn(ldb);
+ if (base != NULL) {
+ req->op.search.base = base;
+ }
+ }
+ }
+
sctx->pending = 0;
ret = ldb_request(ldb, req);
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index e4f1c85..14cc479 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -3290,7 +3290,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX
*mem_ctx)
lpcfg_do_global_parameter(lp_ctx, "max connections", "-1");
lpcfg_do_global_parameter(lp_ctx, "dcerpc endpoint servers", "epmapper
srvsvc wkssvc rpcecho samr netlogon lsarpc spoolss drsuapi winreg dssetup
unixinfo browser eventlog6 backupkey");
- lpcfg_do_global_parameter(lp_ctx, "server services", "smb rpc nbt wrepl
ldap cldap kdc drepl winbind ntp_signd kcc dnsupdate web");
+ lpcfg_do_global_parameter(lp_ctx, "server services", "smb rpc nbt wrepl
ldap cldap kdc drepl winbind ntp_signd kcc dnsupdate");
lpcfg_do_global_parameter(lp_ctx, "ntptr providor", "simple_ldb");
/* the winbind method for domain controllers is for both RODC
auth forwarding and for trusted domains */
diff --git a/source4/scripting/python/samba/dbchecker.py
b/source4/scripting/python/samba/dbchecker.py
index 85c7f80..8b4d33b 100644
--- a/source4/scripting/python/samba/dbchecker.py
+++ b/source4/scripting/python/samba/dbchecker.py
@@ -459,7 +459,7 @@ class dbcheck(object):
list_attrs_seen.append(str(attrname).lower())
if syntax_oid in [ dsdb.DSDB_SYNTAX_BINARY_DN,
dsdb.DSDB_SYNTAX_OR_NAME,
- dsdb.DSDB_SYNTAX_STRING_DN, ldb.LDB_SYNTAX_DN ]:
+ dsdb.DSDB_SYNTAX_STRING_DN, ldb.SYNTAX_DN ]:
# it's some form of DN, do specialised checking on those
error_count += self.check_dn(obj, attrname, syntax_oid)
diff --git a/wintest/conf/abartlet.conf b/wintest/conf/abartlet.conf
index 15437d0..2e92cc4 100644
--- a/wintest/conf/abartlet.conf
+++ b/wintest/conf/abartlet.conf
@@ -40,7 +40,7 @@ PASSWORD3 : p@ssw0rd3
# a Windows7 VM
WINDOWS7_HOSTNAME : Windows7-1
WINDOWS7_VM : Windows7-1
-WINDOWS7_SNAPSHOT : 1290389594
+WINDOWS7_SNAPSHOT : 1314657542
WINDOWS7_USER : administrator
WINDOWS7_PASS : penguin
@@ -67,8 +67,8 @@ W2K8R2B_PASS : penguin12#
W2K8R2B_SNAPSHOT : 1291077001
# this w2k8r2 VM will become a RODC in the samba domain
-W2K8R2C_HOSTNAME : Win2008R2-4
-W2K8R2C_VM : Win2008R2-4
+W2K8R2C_HOSTNAME : Win2008R2-5
+W2K8R2C_VM : Win2008R2-5
W2K8R2C_PASS : penguin12#
W2K8R2C_SNAPSHOT : 1291076693
@@ -78,7 +78,7 @@ W2K3A_VM : Win2003R2-2
W2K3A_REALM : 2003.HOWTO.ABARTLET.NET
W2K3A_DOMAIN : 2003HOWTO
W2K3A_PASS : penguin
-W2K3A_SNAPSHOT : 1301283640
+W2K3A_SNAPSHOT : 1314652035
W2K3A_IP : 192.168.122.91
# this w2k3 VM will become a DC in the samba domain
@@ -92,7 +92,7 @@ W2K3B_IP : 192.168.122.155
W2K3C_HOSTNAME : Win2003-1
W2K3C_VM : Win2003-1
W2K3C_PASS : penguin
-W2K3C_SNAPSHOT : 1297900649
+W2K3C_SNAPSHOT : 1314652223
W2K3C_IP : 192.168.122.38
--
Samba Shared Repository