summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2013-04-03 16:37:00 +0300
committerAndreas Schneider <asn@cryptomilk.org>2013-04-09 20:29:18 +0200
commit5952755755fb0ea7f942bb564ca1cfdca5730113 (patch)
tree555ca497c14a9b2113f187ba5c9c0f8baf24def7 /source3/include
parentb752417f2d6c478524f0fbf0fda1a5d0401b6f9e (diff)
downloadsamba-5952755755fb0ea7f942bb564ca1cfdca5730113.tar.gz
samba-5952755755fb0ea7f942bb564ca1cfdca5730113.tar.bz2
samba-5952755755fb0ea7f942bb564ca1cfdca5730113.zip
PASSDB: add support to set and enumerate UPN suffixes associated with our forest
Samba PDC may manage a forest containing DNS domains in addition to the primary one. Information about them is advertised via netr_DsRGetForestTrustInformation when trusted_domain_name is NULL, according to MS-NRPC and MS-LSAD, and via netr_GetForestTrustInformation. This changeset only expands PASSDB API; how suffixes are maintained is left to specific PDB modules. Set function is added so that suffixes could be managed through 'net' and other Samba utilities, if possible. One possible implementation is available for ipasam module in FreeIPA: http://git.fedorahosted.org/cgit/freeipa.git/commit/?id=cc56723151c9ebf58d891e85617319d861af14a4 Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/passdb.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index 908631de31..5e5a7bfa58 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -412,9 +412,10 @@ enum pdb_policy_type {
* Changed to 18, pdb_rid_algorithm -> pdb_capabilities
* Changed to 19, removed uid_to_rid
* Changed to 20, pdb_secret calls
+ * Changed to 21, set/enum_upn_suffixes. AB.
*/
-#define PASSDB_INTERFACE_VERSION 20
+#define PASSDB_INTERFACE_VERSION 21
struct pdb_methods
{
@@ -614,6 +615,15 @@ struct pdb_methods
NTSTATUS (*delete_secret)(struct pdb_methods *methods,
const char *secret_name);
+ NTSTATUS (*enum_upn_suffixes)(struct pdb_methods *methods,
+ TALLOC_CTX *mem_ctx,
+ uint32_t *num_suffixes,
+ char ***suffixes);
+
+ NTSTATUS (*set_upn_suffixes)(struct pdb_methods *methods,
+ uint32_t num_suffixes,
+ const char **suffixes);
+
void *private_data; /* Private data of some kind */
void (*free_private_data)(void **);
@@ -911,6 +921,12 @@ NTSTATUS pdb_delete_secret(const char *secret_name);
bool pdb_sid_to_id_unix_users_and_groups(const struct dom_sid *sid,
struct unixid *id);
+NTSTATUS pdb_enum_upn_suffixes(TALLOC_CTX *mem_ctx,
+ uint32_t *num_suffixes,
+ char ***suffixes);
+
+NTSTATUS pdb_set_upn_suffixes(uint32_t num_suffixes,
+ const char **suffixes);
/* The following definitions come from passdb/pdb_util.c */