diff options
author | Volker Lendecke <vlendec@samba.org> | 2004-03-13 16:30:39 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2004-03-13 16:30:39 +0000 |
commit | 146d674c2ce78ddb2e3e5a63ad4f2e53b52d093e (patch) | |
tree | 667bf1abc6da977a8e5ee59873afd88a2a5c0509 /source3/include | |
parent | 309c0a65b7de7311a5032d6a8e41c9eb039af2aa (diff) | |
download | samba-146d674c2ce78ddb2e3e5a63ad4f2e53b52d093e.tar.gz samba-146d674c2ce78ddb2e3e5a63ad4f2e53b52d093e.tar.bz2 samba-146d674c2ce78ddb2e3e5a63ad4f2e53b52d093e.zip |
Add find_alias, create_alias, delete_alias, get_aliasinfo, set_aliasinfo and
enum_aliases to passdb. create and delete are not yet filled, you have to do
this with net groupmap and net idmap restore.
Volker
(This used to be commit f44bf63d1143ddf6a1a2fdc15a301e0dc0840d50)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/ntdomain.h | 7 | ||||
-rw-r--r-- | source3/include/passdb.h | 53 |
2 files changed, 52 insertions, 8 deletions
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index eaedc7ea9b..4e6795a85d 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -382,13 +382,6 @@ typedef struct } rid_name; -struct acct_info -{ - fstring acct_name; /* account name */ - fstring acct_desc; /* account name */ - uint32 rid; /* domain-relative RID */ -}; - /* * higher order functions for use with msrpc client code */ diff --git a/source3/include/passdb.h b/source3/include/passdb.h index df7c969633..21feb7208f 100644 --- a/source3/include/passdb.h +++ b/source3/include/passdb.h @@ -232,6 +232,12 @@ typedef struct _GROUP_INFO { fstring comment; } GROUP_INFO; +struct acct_info +{ + fstring acct_name; /* account name */ + fstring acct_desc; /* account name */ + uint32 rid; /* domain-relative RID */ +}; typedef struct sam_trust_passwd { TALLOC_CTX *mem_ctx; @@ -262,7 +268,7 @@ typedef struct sam_trust_passwd { * this SAMBA will load. Increment this if *ANY* changes are made to the interface. */ -#define PASSDB_INTERFACE_VERSION 6 +#define PASSDB_INTERFACE_VERSION 7 typedef struct pdb_context { @@ -310,6 +316,29 @@ typedef struct pdb_context GROUP_MAP **rmap, int *num_entries, BOOL unix_only); + NTSTATUS (*pdb_find_alias)(struct pdb_context *context, + const char *name, DOM_SID *sid); + + NTSTATUS (*pdb_create_alias)(struct pdb_context *context, + const char *name, uint32 *rid); + + NTSTATUS (*pdb_delete_alias)(struct pdb_context *context, + const DOM_SID *sid); + + NTSTATUS (*pdb_enum_aliases)(struct pdb_context *context, + const DOM_SID *domain_sid, + uint32 start_idx, uint32 num_entries, + uint32 *num_aliases, + struct acct_info **aliases); + + NTSTATUS (*pdb_get_aliasinfo)(struct pdb_context *context, + const DOM_SID *sid, + struct acct_info *info); + + NTSTATUS (*pdb_set_aliasinfo)(struct pdb_context *context, + const DOM_SID *sid, + struct acct_info *info); + NTSTATUS (*pdb_add_aliasmem)(struct pdb_context *context, const DOM_SID *alias, const DOM_SID *member); @@ -430,6 +459,28 @@ typedef struct pdb_methods GROUP_MAP **rmap, int *num_entries, BOOL unix_only); + NTSTATUS (*find_alias)(struct pdb_methods *methods, + const char *name, DOM_SID *sid); + + NTSTATUS (*create_alias)(struct pdb_methods *methods, + const char *name, uint32 *rid); + + NTSTATUS (*delete_alias)(struct pdb_methods *methods, + const DOM_SID *sid); + + NTSTATUS (*enum_aliases)(struct pdb_methods *methods, + const DOM_SID *domain_sid, + uint32 start_idx, uint32 max_entries, + uint32 *num_aliases, struct acct_info **info); + + NTSTATUS (*get_aliasinfo)(struct pdb_methods *methods, + const DOM_SID *sid, + struct acct_info *info); + + NTSTATUS (*set_aliasinfo)(struct pdb_methods *methods, + const DOM_SID *sid, + struct acct_info *info); + NTSTATUS (*add_aliasmem)(struct pdb_methods *methods, const DOM_SID *alias, const DOM_SID *member); NTSTATUS (*del_aliasmem)(struct pdb_methods *methods, |