From ea7cdc4de060181b11779d726ba2aecf0a09b72b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 22 Jun 2002 12:19:35 +0000 Subject: 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) --- source3/include/passdb.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source3/include/passdb.h') 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; -- cgit