From cc60b069836cbc355e828675e6f089b6ef22b32e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 13 Apr 2002 08:16:41 +0000 Subject: This is the 'multiple pdb backends' patch from ctrlsoft, aka Jelmer Vernooij . This patch also includes major rework of pdbedit to use popt, and the addition of -i paramter (allowing the user to specify which PDBs is being operated on) and -e to export a pdb - useful for backup and testing etc. Use of -i and -e gets us pdb2pdb functionality for transition between backends, much like the sam2sam in TNG. Andrew Bartlett (This used to be commit c10def37f506d3f2bab442418ac08fdb62659b02) --- source3/include/passdb.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'source3/include/passdb.h') diff --git a/source3/include/passdb.h b/source3/include/passdb.h index f17b043fb2..9e14718994 100644 --- a/source3/include/passdb.h +++ b/source3/include/passdb.h @@ -29,7 +29,8 @@ typedef struct pdb_context { - struct pdb_methods *pdb_selected; + struct pdb_methods *pdb_methods; + struct pdb_methods *pwent_methods; /* These functions are wrappers for the functions listed above. They may do extra things like re-reading a SAM_ACCOUNT on update */ @@ -59,22 +60,27 @@ typedef struct pdb_context typedef struct pdb_methods { const char *name; /* What name got this module */ + struct pdb_context *parent; - BOOL (*setsampwent)(struct pdb_context *, BOOL update); + /* Use macros from dlinklist.h on these two */ + struct pdb_methods *next; + struct pdb_methods *prev; + + BOOL (*setsampwent)(struct pdb_methods *, BOOL update); - void (*endsampwent)(struct pdb_context *); + void (*endsampwent)(struct pdb_methods *); - BOOL (*getsampwent)(struct pdb_context *, SAM_ACCOUNT *user); + BOOL (*getsampwent)(struct pdb_methods *, SAM_ACCOUNT *user); - BOOL (*getsampwnam)(struct pdb_context *, SAM_ACCOUNT *sam_acct, const char *username); + BOOL (*getsampwnam)(struct pdb_methods *, SAM_ACCOUNT *sam_acct, const char *username); - BOOL (*getsampwrid)(struct pdb_context *, SAM_ACCOUNT *sam_acct, uint32 rid); + BOOL (*getsampwrid)(struct pdb_methods *, SAM_ACCOUNT *sam_acct, uint32 rid); - BOOL (*add_sam_account)(struct pdb_context *, const SAM_ACCOUNT *sampass); + BOOL (*add_sam_account)(struct pdb_methods *, const SAM_ACCOUNT *sampass); - BOOL (*update_sam_account)(struct pdb_context *, const SAM_ACCOUNT *sampass); + BOOL (*update_sam_account)(struct pdb_methods *, const SAM_ACCOUNT *sampass); - BOOL (*delete_sam_account)(struct pdb_context *, const SAM_ACCOUNT *username); + BOOL (*delete_sam_account)(struct pdb_methods *, const SAM_ACCOUNT *username); void *private_data; /* Private data of some kind */ -- cgit