summaryrefslogtreecommitdiff
path: root/examples/pdb/pdb_test.c
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 /examples/pdb/pdb_test.c
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 'examples/pdb/pdb_test.c')
-rw-r--r--examples/pdb/pdb_test.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/examples/pdb/pdb_test.c b/examples/pdb/pdb_test.c
index c932c6128b..d2722d2e03 100644
--- a/examples/pdb/pdb_test.c
+++ b/examples/pdb/pdb_test.c
@@ -19,10 +19,15 @@
#include "includes.h"
+
static int testsam_debug_level = DBGC_ALL;
+
#undef DBGC_CLASS
#define DBGC_CLASS testsam_debug_level
+/* define the version of the passdb interface */
+PDB_MODULE_VERSIONING_MAGIC
+
/***************************************************************
Start enumeration of the passwd list.
****************************************************************/
@@ -63,12 +68,12 @@ static BOOL testsam_getsampwnam (struct pdb_methods *methods, SAM_ACCOUNT *user,
}
/***************************************************************************
- Search by rid
+ Search by sid
**************************************************************************/
-static BOOL testsam_getsampwrid (struct pdb_methods *methods, SAM_ACCOUNT *user, uint32 rid)
+static BOOL testsam_getsampwsid (struct pdb_methods *methods, SAM_ACCOUNT *user, DOM_SID sid)
{
- DEBUG(10, ("testsam_getsampwrid called\n"));
+ DEBUG(10, ("testsam_getsampwsid called\n"));
return False;
}
@@ -119,7 +124,7 @@ NTSTATUS pdb_init(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, const char
(*pdb_method)->endsampwent = testsam_endsampwent;
(*pdb_method)->getsampwent = testsam_getsampwent;
(*pdb_method)->getsampwnam = testsam_getsampwnam;
- (*pdb_method)->getsampwrid = testsam_getsampwrid;
+ (*pdb_method)->getsampwsid = testsam_getsampwsid;
(*pdb_method)->add_sam_account = testsam_add_sam_account;
(*pdb_method)->update_sam_account = testsam_update_sam_account;
(*pdb_method)->delete_sam_account = testsam_delete_sam_account;