summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-06-22 12:19:35 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-06-22 12:19:35 +0000
commitea7cdc4de060181b11779d726ba2aecf0a09b72b (patch)
tree54fb365e0360e1179ebe962cc674b5c1ae691823 /source3/include
parent6b4dde0c241a4fcf2478336bc0f8d7f5649c82ee (diff)
downloadsamba-ea7cdc4de060181b11779d726ba2aecf0a09b72b.tar.gz
samba-ea7cdc4de060181b11779d726ba2aecf0a09b72b.tar.bz2
samba-ea7cdc4de060181b11779d726ba2aecf0a09b72b.zip
Add module versioning to the passdb module system
All passdb modules need to include a 'magic' macro that creates simple 'return my version number' function. (from metze and jelmer) Also fix up the dir_drive autosubsitute code to correctly use lp_logon_drive(). (from metze) Andrew Bartlett (This used to be commit 4a57c445dd4354034fc41b132a484afe6ab66e16)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/passdb.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index bd1d1e159b..a79c8a0289 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -27,6 +27,20 @@
Functions to be implemented by the new (v2) passdb API
****************************************************************/
+/*
+ * This next constant specifies the version number of the PASSDB interface
+ * this SAMBA will load. Increment this if *ANY* changes are made to the interface.
+ */
+
+#define PASSDB_INTERFACE_VERSION 2
+
+/* use this inside a passdb module */
+#define PDB_MODULE_VERSIONING_MAGIC \
+int pdb_version(void)\
+{\
+ return PASSDB_INTERFACE_VERSION;\
+}
+
typedef struct pdb_context
{
struct pdb_methods *pdb_methods;