diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-12-16 17:13:19 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-12-16 20:56:23 +1100 |
commit | 99557563141a3776b05bebba0436c56e72f9e20f (patch) | |
tree | 79f1efc6e1982f74e7b5b4a657fee4b75f67cb6c /source4 | |
parent | f8320b3559956b06d3b54e7707986d03aa5084f3 (diff) | |
download | samba-99557563141a3776b05bebba0436c56e72f9e20f.tar.gz |
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')
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_tdb.c | 13 |
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 48409f2cba6..227a202a6ff 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; |