ldb: added ldb_req_mark_trusted()
authorAndrew Tridgell <tridge@samba.org>
Mon, 17 Jan 2011 02:11:08 +0000 (13:11 +1100)
committerAndrew Tridgell <tridge@samba.org>
Mon, 17 Jan 2011 04:23:04 +0000 (05:23 +0100)
this is used to mark a ldb child request trusted, if the caller has
validated all inputs. This will be used when creating new child
requests with trusted inputs.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/lib/ldb/common/ldb.c
source4/lib/ldb/include/ldb_module.h
source4/lib/ldb/wscript

index 0c2aa34289f9e70ada31a247b123e65893bd20d5..f644855753690692e6a997ca62baa3f027b19128 100644 (file)
@@ -1843,6 +1843,14 @@ void ldb_req_mark_untrusted(struct ldb_request *req)
        req->handle->flags |= LDB_HANDLE_FLAG_UNTRUSTED;
 }
 
+/**
+  mark a request as trusted.
+ */
+void ldb_req_mark_trusted(struct ldb_request *req)
+{
+       req->handle->flags &= ~LDB_HANDLE_FLAG_UNTRUSTED;
+}
+
 /**
    return true is a request is untrusted
  */
index 35dbd120fa8d3ff06abd957b16181c3e1937c9b0..a793525b7c18dd9660971b429a5c31cf88115b29 100644 (file)
@@ -227,6 +227,11 @@ int ldb_reply_add_control(struct ldb_reply *ares, const char *oid, bool critical
  */
 void ldb_req_mark_untrusted(struct ldb_request *req);
 
+/**
+  mark a request as trusted.
+ */
+void ldb_req_mark_trusted(struct ldb_request *req);
+
 /**
    return true is a request is untrusted
  */
index b0635c5d67d6c876844864624c2140627a04737f..81d2adcfd3935fe2d76f9894f21dc2e1884b9a43 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 APPNAME = 'ldb'
-VERSION = '0.9.23'
+VERSION = '0.9.24'
 
 blddir = 'bin'