diff options
Diffstat (limited to 'examples/pdb/pdb_test.c')
-rw-r--r-- | examples/pdb/pdb_test.c | 60 |
1 files changed, 19 insertions, 41 deletions
diff --git a/examples/pdb/pdb_test.c b/examples/pdb/pdb_test.c index d2722d2e03..4b4189e9d5 100644 --- a/examples/pdb/pdb_test.c +++ b/examples/pdb/pdb_test.c @@ -17,24 +17,11 @@ * Mass Ave, Cambridge, MA 02139, USA. */ - #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. -****************************************************************/ - -static BOOL testsam_setsampwent(struct pdb_methods *methods, BOOL update) +static BOOL testsam_setsampwent(struct pdb_context *context, BOOL update) { - DEBUG(10, ("testsam_setsampwent called\n")); + DEBUG(0, ("testsam_setsampwent called\n")); return True; } @@ -42,18 +29,18 @@ static BOOL testsam_setsampwent(struct pdb_methods *methods, BOOL update) End enumeration of the passwd list. ****************************************************************/ -static void testsam_endsampwent(struct pdb_methods *methods) +static void testsam_endsampwent(struct pdb_context *context) { - DEBUG(10, ("testsam_endsampwent called\n")); + DEBUG(0, ("testsam_endsampwent called\n")); } /***************************************************************** Get one SAM_ACCOUNT from the list (next in line) *****************************************************************/ -static BOOL testsam_getsampwent(struct pdb_methods *methods, SAM_ACCOUNT *user) +static BOOL testsam_getsampwent(struct pdb_context *context, SAM_ACCOUNT *user) { - DEBUG(10, ("testsam_getsampwent called\n")); + DEBUG(0, ("testsam_getsampwent called\n")); return False; } @@ -61,19 +48,19 @@ static BOOL testsam_getsampwent(struct pdb_methods *methods, SAM_ACCOUNT *user) Lookup a name in the SAM database ******************************************************************/ -static BOOL testsam_getsampwnam (struct pdb_methods *methods, SAM_ACCOUNT *user, const char *sname) +static BOOL testsam_getsampwnam (struct pdb_context *context, SAM_ACCOUNT *user, const char *sname) { - DEBUG(10, ("testsam_getsampwnam called\n")); + DEBUG(0, ("testsam_getsampwnam called\n")); return False; } /*************************************************************************** - Search by sid + Search by rid **************************************************************************/ -static BOOL testsam_getsampwsid (struct pdb_methods *methods, SAM_ACCOUNT *user, DOM_SID sid) +static BOOL testsam_getsampwrid (struct pdb_context *context, SAM_ACCOUNT *user, uint32 rid) { - DEBUG(10, ("testsam_getsampwsid called\n")); + DEBUG(0, ("testsam_getsampwrid called\n")); return False; } @@ -81,9 +68,9 @@ static BOOL testsam_getsampwsid (struct pdb_methods *methods, SAM_ACCOUNT *user, Delete a SAM_ACCOUNT ****************************************************************************/ -static BOOL testsam_delete_sam_account(struct pdb_methods *methods, const SAM_ACCOUNT *sam_pass) +static BOOL testsam_delete_sam_account(struct pdb_context *context, const SAM_ACCOUNT *sam_pass) { - DEBUG(10, ("testsam_delete_sam_account called\n")); + DEBUG(0, ("testsam_delete_sam_account called\n")); return False; } @@ -91,9 +78,9 @@ static BOOL testsam_delete_sam_account(struct pdb_methods *methods, const SAM_AC Modifies an existing SAM_ACCOUNT ****************************************************************************/ -static BOOL testsam_update_sam_account (struct pdb_methods *methods, const SAM_ACCOUNT *newpwd) +static BOOL testsam_update_sam_account (struct pdb_context *context, const SAM_ACCOUNT *newpwd) { - DEBUG(10, ("testsam_update_sam_account called\n")); + DEBUG(0, ("testsam_update_sam_account called\n")); return False; } @@ -101,9 +88,9 @@ static BOOL testsam_update_sam_account (struct pdb_methods *methods, const SAM_A Adds an existing SAM_ACCOUNT ****************************************************************************/ -static BOOL testsam_add_sam_account (struct pdb_methods *methods, const SAM_ACCOUNT *newpwd) +static BOOL testsam_add_sam_account (struct pdb_context *context, const SAM_ACCOUNT *newpwd) { - DEBUG(10, ("testsam_add_sam_account called\n")); + DEBUG(0, ("testsam_add_sam_account called\n")); return False; } @@ -117,27 +104,18 @@ NTSTATUS pdb_init(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, const char (*pdb_method)->name = "testsam"; - /* Functions your pdb module doesn't provide should be set - * to NULL */ - (*pdb_method)->setsampwent = testsam_setsampwent; (*pdb_method)->endsampwent = testsam_endsampwent; (*pdb_method)->getsampwent = testsam_getsampwent; (*pdb_method)->getsampwnam = testsam_getsampwnam; - (*pdb_method)->getsampwsid = testsam_getsampwsid; + (*pdb_method)->getsampwrid = testsam_getsampwrid; (*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; - - testsam_debug_level = debug_add_class("testsam"); - if (testsam_debug_level == -1) { - testsam_debug_level = DBGC_ALL; - DEBUG(0, ("testsam: Couldn't register custom debugging class!\n")); - } else DEBUG(0, ("testsam: Debug class number of 'testsam': %d\n", testsam_debug_level)); DEBUG(0, ("Initializing testsam\n")); if (location) - DEBUG(10, ("Location: %s\n", location)); + DEBUG(0, ("Location: %s\n", location)); return NT_STATUS_OK; } |