diff options
author | Alexander Bokovoy <ab@samba.org> | 2013-04-03 16:37:00 +0300 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-04-09 20:29:18 +0200 |
commit | 5952755755fb0ea7f942bb564ca1cfdca5730113 (patch) | |
tree | 555ca497c14a9b2113f187ba5c9c0f8baf24def7 /source3/passdb/pdb_interface.c | |
parent | b752417f2d6c478524f0fbf0fda1a5d0401b6f9e (diff) | |
download | samba-5952755755fb0ea7f942bb564ca1cfdca5730113.tar.gz |
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/passdb/pdb_interface.c')
-rw-r--r-- | source3/passdb/pdb_interface.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index 775f8a3e89f..36dde6f8e6c 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -2340,6 +2340,39 @@ static struct pdb_domain_info *pdb_default_get_domain_info( return NULL; } +/***************************************************************** + UPN suffixes + *****************************************************************/ +static NTSTATUS pdb_default_enum_upn_suffixes(struct pdb_methods *pdb, + TALLOC_CTX *mem_ctx, + uint32_t *num_suffixes, + char ***suffixes) +{ + return NT_STATUS_NOT_IMPLEMENTED; +} + +static NTSTATUS pdb_default_set_upn_suffixes(struct pdb_methods *pdb, + uint32_t num_suffixes, + const char **suffixes) +{ + return NT_STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS pdb_enum_upn_suffixes(TALLOC_CTX *mem_ctx, + uint32_t *num_suffixes, + char ***suffixes) +{ + struct pdb_methods *pdb = pdb_get_methods(); + return pdb->enum_upn_suffixes(pdb, mem_ctx, num_suffixes, suffixes); +} + +NTSTATUS pdb_set_upn_suffixes(uint32_t num_suffixes, + const char **suffixes) +{ + struct pdb_methods *pdb = pdb_get_methods(); + return pdb->set_upn_suffixes(pdb, num_suffixes, suffixes); +} + /******************************************************************* secret methods *******************************************************************/ @@ -2487,5 +2520,8 @@ NTSTATUS make_pdb_method( struct pdb_methods **methods ) (*methods)->set_secret = pdb_default_set_secret; (*methods)->delete_secret = pdb_default_delete_secret; + (*methods)->enum_upn_suffixes = pdb_default_enum_upn_suffixes; + (*methods)->set_upn_suffixes = pdb_default_set_upn_suffixes; + return NT_STATUS_OK; } |