summaryrefslogtreecommitdiff
path: root/source3/include/smb.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-05-18 23:57:28 +0000
committerJeremy Allison <jra@samba.org>1998-05-18 23:57:28 +0000
commit118827376f8ccedb455e81b7d2b3bff029cde457 (patch)
tree2d30e099e7d04926af763ec530cdbd281ce6fafd /source3/include/smb.h
parentffab54750f0eec202895670dd9293ee4aa3eb475 (diff)
downloadsamba-118827376f8ccedb455e81b7d2b3bff029cde457.tar.gz
samba-118827376f8ccedb455e81b7d2b3bff029cde457.tar.bz2
samba-118827376f8ccedb455e81b7d2b3bff029cde457.zip
Abstracted all the crappy password interfaces through an indirect
function table, selectable at compile time. This should make the code that implements all the password functions much cleaner, as it's now very clear exactly what a particular password database needs to provide to Samba. Jeremy. (This used to be commit 27ca536ad974242524c12f7100e419d9e7f9647f)
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r--source3/include/smb.h38
1 files changed, 37 insertions, 1 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index c90f77a593..fff44f179d 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -332,7 +332,6 @@ struct sam_disp_info
char *full_name; /* user's full name string */
};
-
/* DOM_CHAL - challenge info */
typedef struct chal_info
{
@@ -635,8 +634,45 @@ struct shmem_ops {
unsigned (*hash_size)(void);
};
+/*
+ * Each implementation of the password database code needs
+ * to support the following operations.
+ */
+
+struct passdb_ops {
+ /*
+ * Password database ops.
+ */
+ void *(*startsmbpwent)(BOOL);
+ void (*endsmbpwent)(void *);
+ unsigned long (*getsmbpwpos)(void *);
+ BOOL (*setsmbpwpos)(void *, unsigned long);
+ /*
+ * smb password database query functions.
+ */
+ struct smb_passwd *(*getsmbpwnam)(char *);
+ struct smb_passwd *(*getsmbpwuid)(uid_t);
+ struct smb_passwd *(*getsmbpwent)(void *);
+ /*
+ * smb password database modification functions.
+ */
+ BOOL (*add_smbpwd_entry)(struct smb_passwd *);
+ BOOL (*mod_smbpwd_entry)(struct smb_passwd *, BOOL);
+
+ /*
+ * Functions that manupulate a struct sam_passwd.
+ */
+ struct sam_passwd *(*getsam21pwent)(void *);
+
+ struct sam_passwd *(*getsam21pwnam)(char *);
+ struct sam_passwd *(*getsam21pwuid)(uint32);
+
+ BOOL (*add_sam21pwd_entry)(struct sam_passwd *);
+ BOOL (*mod_sam21pwd_entry)(struct sam_passwd *, BOOL);
+};
/* this is used for smbstatus */
+
struct connect_record
{
int magic;