summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-08-05 21:58:57 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-08-07 14:22:41 +0200
commit25e973d5db9ffa6d4138cdbe7c3dd1880149ad2a (patch)
tree2f22bfe6dc18b512e8b6a7b61c481486b97a8e90 /source4
parent7d62128e2cce540043df84d51967e43bdca4c493 (diff)
downloadsamba-25e973d5db9ffa6d4138cdbe7c3dd1880149ad2a.tar.gz
samba-25e973d5db9ffa6d4138cdbe7c3dd1880149ad2a.tar.bz2
samba-25e973d5db9ffa6d4138cdbe7c3dd1880149ad2a.zip
s4:dsdb/common/util.c - add a function "dsdb_add"
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/common/util.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index b8d72781f6..52ba81d975 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -3528,6 +3528,36 @@ int dsdb_request_add_controls(struct ldb_request *req, uint32_t dsdb_flags)
}
/*
+ an add with a set of controls
+*/
+int dsdb_add(struct ldb_context *ldb, const struct ldb_message *message,
+ uint32_t dsdb_flags)
+{
+ struct ldb_request *req;
+ int ret;
+
+ ret = ldb_build_add_req(&req, ldb, ldb,
+ message,
+ NULL,
+ NULL,
+ ldb_op_default_callback,
+ NULL);
+
+ if (ret != LDB_SUCCESS) return ret;
+
+ ret = dsdb_request_add_controls(req, dsdb_flags);
+ if (ret != LDB_SUCCESS) {
+ talloc_free(req);
+ return ret;
+ }
+
+ ret = dsdb_autotransaction_request(ldb, req);
+
+ talloc_free(req);
+ return ret;
+}
+
+/*
a modify with a set of controls
*/
int dsdb_modify(struct ldb_context *ldb, const struct ldb_message *message,