summaryrefslogtreecommitdiff
path: root/lib/util/util_ntdb.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-06-22 09:44:41 +0930
committerRusty Russell <rusty@rustcorp.com.au>2012-06-22 07:35:17 +0200
commit8113d53bb421217040a8184ba00f61308e8959d6 (patch)
treecddf15c4f912758d244232ae01a91121d064b42f /lib/util/util_ntdb.h
parent735290f474a34986be4c66eb0bdf0b0ba14da970 (diff)
downloadsamba-8113d53bb421217040a8184ba00f61308e8959d6.tar.gz
samba-8113d53bb421217040a8184ba00f61308e8959d6.tar.bz2
samba-8113d53bb421217040a8184ba00f61308e8959d6.zip
util: ntdb_new() supports NTDB_CLEAR_IF_FIRST.
There are various issues with NTDB_CLEAR_IF_FIRST which makes it better if we don't have to use it, but much of the code does, so we fake up support here. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/util/util_ntdb.h')
-rw-r--r--lib/util/util_ntdb.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/util/util_ntdb.h b/lib/util/util_ntdb.h
index a5eab7f436..d65d8b6f7b 100644
--- a/lib/util/util_ntdb.h
+++ b/lib/util/util_ntdb.h
@@ -27,6 +27,21 @@
struct loadparm_context;
union ntdb_attribute;
+
+/* You only need this on databases with NTDB_CLEAR_IF_FIRST */
+int ntdb_reopen(struct ntdb_context *ntdb);
+
+/* You only need to do this if you have NTDB_CLEAR_IF_FIRST databases, and
+ * the parent will go away before this child. */
+int ntdb_reopen_all(void);
+
+/*
+ * This is like TDB_CLEAR_IF_FIRST, for use with ntdb_new.
+ *
+ * It's a bad idea for new code.
+ */
+#define NTDB_CLEAR_IF_FIRST 1048576
+
/***************************************************************
Open an NTDB using talloc: it will be allocated off the context, and
all NTDB_DATA.dptr are allocated as children of the ntdb context.