summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-04-13 08:16:41 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-04-13 08:16:41 +0000
commitcc60b069836cbc355e828675e6f089b6ef22b32e (patch)
tree25a63356598e2491faef6549ebae1e18b352cdba /source3/include
parent2248a889099b3b9452b74eeaa7350d4e0ea82d6a (diff)
downloadsamba-cc60b069836cbc355e828675e6f089b6ef22b32e.tar.gz
samba-cc60b069836cbc355e828675e6f089b6ef22b32e.tar.bz2
samba-cc60b069836cbc355e828675e6f089b6ef22b32e.zip
This is the 'multiple pdb backends' patch from ctrlsoft, aka Jelmer Vernooij
<jelmer@nl.linux.org>. 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)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/passdb.h24
-rw-r--r--source3/include/smb.h2
2 files changed, 17 insertions, 9 deletions
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 */
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 8963528e9a..52b475ff27 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -595,6 +595,8 @@ typedef struct sam_passwd
void (*free_fn)(struct sam_passwd **);
+ struct pdb_methods *methods;
+
struct user_data {
/* initiailization flags */
uint32 init_flag;