summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/include')
-rw-r--r--source4/lib/ldb/include/ldb.h15
-rw-r--r--source4/lib/ldb/include/ldb_errors.h2
-rw-r--r--source4/lib/ldb/include/ldb_private.h8
3 files changed, 22 insertions, 3 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index 0e794c6209..f371c340cc 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -308,6 +308,21 @@ int ldb_rename(struct ldb_context *ldb, const struct ldb_dn *olddn, const struct
*/
int ldb_delete(struct ldb_context *ldb, const struct ldb_dn *dn);
+/*
+ start a transaction
+*/
+int ldb_transaction_start(struct ldb_context *ldb);
+
+/*
+ commit a transaction
+*/
+int ldb_transaction_commit(struct ldb_context *ldb);
+
+/*
+ cancel a transaction
+*/
+int ldb_transaction_cancel(struct ldb_context *ldb);
+
/*
return extended error information from the last call
diff --git a/source4/lib/ldb/include/ldb_errors.h b/source4/lib/ldb/include/ldb_errors.h
index 38c42280d0..f59b39f92a 100644
--- a/source4/lib/ldb/include/ldb_errors.h
+++ b/source4/lib/ldb/include/ldb_errors.h
@@ -40,7 +40,7 @@
* but they are keept here for reference anyway
*/
-#define LDB_ERR_SUCCESS 0
+#define LDB_SUCCESS 0
#define LDB_ERR_OPERATIONS_ERROR 1
#define LDB_ERR_PROTOCOL_ERROR 2
#define LDB_ERR_TIME_LIMIT_EXCEEDED 3
diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h
index 7eb2bca679..2a9139df40 100644
--- a/source4/lib/ldb/include/ldb_private.h
+++ b/source4/lib/ldb/include/ldb_private.h
@@ -65,7 +65,8 @@ struct ldb_module_ops {
int (*delete_record)(struct ldb_module *, const struct ldb_dn *);
int (*rename_record)(struct ldb_module *, const struct ldb_dn *, const struct ldb_dn *);
int (*start_transaction)(struct ldb_module *);
- int (*end_transaction)(struct ldb_module *, int);
+ int (*end_transaction)(struct ldb_module *);
+ int (*del_transaction)(struct ldb_module *);
};
@@ -105,6 +106,8 @@ struct ldb_context {
struct ldb_schema schema;
char *err_string;
+
+ int transaction_active;
};
/* the modules init function */
@@ -137,7 +140,8 @@ int ldb_next_modify_record(struct ldb_module *module, const struct ldb_message *
int ldb_next_delete_record(struct ldb_module *module, const struct ldb_dn *dn);
int ldb_next_rename_record(struct ldb_module *module, const struct ldb_dn *olddn, const struct ldb_dn *newdn);
int ldb_next_start_trans(struct ldb_module *module);
-int ldb_next_end_trans(struct ldb_module *module, int status);
+int ldb_next_end_trans(struct ldb_module *module);
+int ldb_next_del_trans(struct ldb_module *module);
void ldb_set_errstring(struct ldb_module *module, char *err_string);