summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2004-01-07 21:41:48 +0000
committerRafal Szczesniak <mimir@samba.org>2004-01-07 21:41:48 +0000
commitd4f81697d7e95b1fe0b7f8be10e1a87142ce6cfa (patch)
treedc519291942b03d5f950fd5111024a0e81255d63 /source3/include
parentd5f77ecd29f0030462fcac1ce786a50f761e2ec1 (diff)
downloadsamba-d4f81697d7e95b1fe0b7f8be10e1a87142ce6cfa.tar.gz
samba-d4f81697d7e95b1fe0b7f8be10e1a87142ce6cfa.tar.bz2
samba-d4f81697d7e95b1fe0b7f8be10e1a87142ce6cfa.zip
Prototype version of trust passwords moved to SAM/pdb. This is
backend-independent part ie. interface - does build and (it seems) doesn't break anything else. rafal (This used to be commit 9ce6dc6476202d9db6ea1c2deab93e454e4db546)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/passdb.h55
1 files changed, 54 insertions, 1 deletions
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index d7f11781fe..c12cf10cf2 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -78,6 +78,15 @@ enum pdb_group_elements {
PDB_GROUP_COUNT
};
+enum pdb_trust_passwd_elements {
+ PDB_TRUST_PASS,
+ PDB_TRUST_SID,
+ PDB_TRUST_NAME,
+ PDB_TRUST_MODTIME,
+ PDB_TRUST_FLAGS,
+
+ PDB_TRUST_COUNT
+};
enum pdb_value_state {
PDB_DEFAULT=0,
@@ -186,6 +195,26 @@ typedef struct _GROUP_INFO {
} GROUP_INFO;
+typedef struct sam_trust_passwd {
+ TALLOC_CTX *mem_ctx;
+
+ void (*free_fn)(struct sam_trust_passwd **);
+
+ struct pdb_methods *methods;
+
+ struct trust_passwd_data {
+ uint16 flags; /* flags */
+ size_t uni_name_len; /* unicode name length */
+ smb_ucs2_t uni_name[32]; /* unicode domain name */
+ fstring pass; /* trust password */
+ time_t mod_time; /* last change time */
+ DOM_SID domain_sid; /* trusted domain sid */
+ } private;
+
+} SAM_TRUST_PASSWD;
+
+
+
/*****************************************************************
Functions to be implemented by the new (v2) passdb API
****************************************************************/
@@ -195,7 +224,7 @@ typedef struct _GROUP_INFO {
* this SAMBA will load. Increment this if *ANY* changes are made to the interface.
*/
-#define PASSDB_INTERFACE_VERSION 4
+#define PASSDB_INTERFACE_VERSION 5
typedef struct pdb_context
{
@@ -267,6 +296,18 @@ typedef struct pdb_context
NTSTATUS (*pdb_get_group_uids)(struct pdb_context *context, const DOM_SID *group, uid_t **members, int *num_members);
+ /* trust password functions */
+
+ NTSTATUS (*pdb_gettrustpwent)(struct pdb_context *context, SAM_TRUST_PASSWD *trust);
+
+ NTSTATUS (*pdb_gettrustpwsid)(struct pdb_context *context, SAM_TRUST_PASSWD *trust, const DOM_SID *sid);
+
+ NTSTATUS (*pdb_add_trust_passwd)(struct pdb_context *context, SAM_TRUST_PASSWD* trust);
+
+ NTSTATUS (*pdb_update_trust_passwd)(struct pdb_context *context, SAM_TRUST_PASSWD* trust);
+
+ NTSTATUS (*pdb_delete_trust_passwd)(struct pdb_context *context, SAM_TRUST_PASSWD* trust);
+
void (*free_fn)(struct pdb_context **);
TALLOC_CTX *mem_ctx;
@@ -347,6 +388,18 @@ typedef struct pdb_methods
void *private_data; /* Private data of some kind */
void (*free_private_data)(void **);
+
+ /* trust password functions */
+
+ NTSTATUS (*gettrustpwent)(struct pdb_methods *methods, SAM_TRUST_PASSWD *trust);
+
+ NTSTATUS (*gettrustpwsid)(struct pdb_methods *methods, SAM_TRUST_PASSWD *trust, const DOM_SID *sid);
+
+ NTSTATUS (*add_trust_passwd)(struct pdb_methods *methods, const SAM_TRUST_PASSWD* trust);
+
+ NTSTATUS (*update_trust_passwd)(struct pdb_methods *methods, const SAM_TRUST_PASSWD* trust);
+
+ NTSTATUS (*delete_trust_passwd)(struct pdb_methods *methods, const SAM_TRUST_PASSWD* trust);
} PDB_METHODS;