summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-16 17:13:19 +1100
committerAndrew Tridgell <tridge@samba.org>2009-12-16 20:56:23 +1100
commit99557563141a3776b05bebba0436c56e72f9e20f (patch)
tree79f1efc6e1982f74e7b5b4a657fee4b75f67cb6c /source4/lib
parentf8320b3559956b06d3b54e7707986d03aa5084f3 (diff)
downloadsamba-99557563141a3776b05bebba0436c56e72f9e20f.tar.gz
samba-99557563141a3776b05bebba0436c56e72f9e20f.tar.bz2
samba-99557563141a3776b05bebba0436c56e72f9e20f.zip
s4-ldb: show the OID of any unhandled critical controls
It isn't very useful just saying that a control is not supported, without saying which one is the problem Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index 48409f2cba..227a202a6f 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -1237,13 +1237,18 @@ static int ltdb_handle_request(struct ldb_module *module,
struct ltdb_context *ac;
struct tevent_timer *te;
struct timeval tv;
-
- if (check_critical_controls(req->controls)) {
- return LDB_ERR_UNSUPPORTED_CRITICAL_EXTENSION;
- }
+ int i;
ldb = ldb_module_get_ctx(module);
+ for (i = 0; req->controls && req->controls[i]; i++) {
+ if (req->controls[i]->critical) {
+ ldb_asprintf_errstring(ldb, "Unsupported critical extension %s",
+ req->controls[i]->oid);
+ return LDB_ERR_UNSUPPORTED_CRITICAL_EXTENSION;
+ }
+ }
+
if (req->starttime == 0 || req->timeout == 0) {
ldb_set_errstring(ldb, "Invalid timeout settings");
return LDB_ERR_TIME_LIMIT_EXCEEDED;