summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/config.h.in4
-rw-r--r--source3/include/includes.h2
-rw-r--r--source3/include/passdb.h67
3 files changed, 69 insertions, 4 deletions
diff --git a/source3/include/config.h.in b/source3/include/config.h.in
index fe4ff0df38..310ef32b2f 100644
--- a/source3/include/config.h.in
+++ b/source3/include/config.h.in
@@ -126,9 +126,6 @@
#undef WITH_PROFILE
#undef WITH_SSL
#undef SSL_DIR
-#undef WITH_LDAP
-#undef WITH_NISPLUS
-#undef WITH_TDBPWD
#undef WITH_PAM
#undef WITH_NISPLUS_HOME
#undef WITH_AUTOMOUNT
@@ -235,7 +232,6 @@
#undef HAVE_CUPS
#undef WITH_LDAP_SAM
#undef WITH_NISPLUS_SAM
-#undef WITH_SMBPASSWD_SAM
#undef WITH_TDB_SAM
#undef LINUX_QUOTAS_1
#undef LINUX_QUOTAS_2
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 0ea387c19c..7f913ba830 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -735,6 +735,8 @@ extern int errno;
#include "auth.h"
+#include "passdb.h"
+
#include "session.h"
#include "asn_1.h"
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index 4e50ff7da5..178b3a4359 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -24,5 +24,72 @@
#define _PASSDB_H
+/*****************************************************************
+ Functions to be implemented by the new (v2) passdb API
+****************************************************************/
+
+typedef struct pdb_context
+{
+ struct pdb_methods *pdb_selected;
+
+ /* These functions are wrappers for the functions listed above.
+ They may do extra things like re-reading a SAM_ACCOUNT on update */
+
+ BOOL (*pdb_setsampwent)(struct pdb_context *, BOOL update);
+
+ void (*pdb_endsampwent)(struct pdb_context *);
+
+ BOOL (*pdb_getsampwent)(struct pdb_context *, SAM_ACCOUNT *user);
+
+ BOOL (*pdb_getsampwnam)(struct pdb_context *, SAM_ACCOUNT *sam_acct, const char *username);
+
+ BOOL (*pdb_getsampwrid)(struct pdb_context *, SAM_ACCOUNT *sam_acct, uint32 rid);
+
+ BOOL (*pdb_add_sam_account)(struct pdb_context *, SAM_ACCOUNT *sampass);
+
+ BOOL (*pdb_update_sam_account)(struct pdb_context *, SAM_ACCOUNT *sampass);
+
+ BOOL (*pdb_delete_sam_account)(struct pdb_context *, SAM_ACCOUNT *username);
+
+ void (*free_fn)(struct pdb_context **);
+
+ TALLOC_CTX *mem_ctx;
+
+} PDB_CONTEXT;
+
+typedef struct pdb_methods
+{
+ char *name; /* What name got this module */
+
+ BOOL (*setsampwent)(struct pdb_context *, BOOL update);
+
+ void (*endsampwent)(struct pdb_context *);
+
+ BOOL (*getsampwent)(struct pdb_context *, SAM_ACCOUNT *user);
+
+ BOOL (*getsampwnam)(struct pdb_context *, SAM_ACCOUNT *sam_acct, const char *username);
+
+ BOOL (*getsampwrid)(struct pdb_context *, SAM_ACCOUNT *sam_acct, uint32 rid);
+
+ BOOL (*add_sam_account)(struct pdb_context *, const SAM_ACCOUNT *sampass);
+
+ BOOL (*update_sam_account)(struct pdb_context *, const SAM_ACCOUNT *sampass);
+
+ BOOL (*delete_sam_account)(struct pdb_context *, const SAM_ACCOUNT *username);
+
+ void *private_data; /* Private data of some kind */
+
+ void (*free_private_data)(void **);
+
+} PDB_METHODS;
+
+
+struct pdb_init_function {
+ char *name;
+ /* Function to create a member of the authmethods list */
+ NTSTATUS (*init)(struct pdb_context *pdb_context,
+ struct pdb_methods **pdb_method,
+ const char *location);
+};
#endif /* _PASSDB_H */