ipa_subdomains_server.c revision 27e89b6925334565c73c407a9ae2809358789c81
/*
SSSD
IPA Subdomains Module - server mode
Authors:
Sumit Bose <sbose@redhat.com>
Copyright (C) 2015 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "providers/ldap/sdap_async.h"
#include "providers/ldap/sdap_idmap.h"
#include "providers/ipa/ipa_subdomains.h"
#include "providers/ipa/ipa_common.h"
static errno_t
struct ipa_id_ctx *id_ctx,
struct sss_domain_info *subdom,
struct ad_id_ctx **_ad_id_ctx)
{
struct ad_options *ad_options;
const char *gc_service_name;
struct ad_srv_plugin_ctx *srv_ctx;
char *ad_domain;
const char *ad_site_override;
struct sdap_domain *sdom;
const char *extra_attrs;
if (ad_options == NULL) {
return ENOMEM;
}
return ret;
}
return ret;
}
if (extra_attrs != NULL) {
"Setting extra attrs for subdomain [%s] to [%s].\n", ad_domain,
return ret;
}
return ret;
}
} else {
}
if (gc_service_name == NULL) {
return ENOMEM;
}
/* Set KRB5 realm to same as the one of IPA when IPA
* is able to attach PAC. For testing, use hardcoded. */
return ret;
}
return ENOMEM;
}
/* use AD plugin */
return ENOMEM;
}
return ret;
}
return EFAULT;
}
sdom,
return ret;
}
/* Set up the ID mapping object */
*_ad_id_ctx = ad_id_ctx;
return EOK;
}
struct ipa_id_ctx *id_ctx,
struct sss_domain_info *subdom)
{
struct ipa_ad_server_ctx *trust_ctx;
return ret;
}
return ENOMEM;
}
return EOK;
}
struct ipa_id_ctx *id_ctx,
struct sss_domain_info *parent)
{
struct sss_domain_info *dom;
struct ipa_ad_server_ctx *trust_iter;
IPA_SERVER_MODE) == false) {
return EOK;
}
/* Check if we already have an ID context for this subdomain */
break;
}
}
/* Newly detected trust */
if (trust_iter == NULL) {
"Cannot create ad_id_ctx for subdomain %s\n",
continue;
}
}
}
return EOK;
}
struct ipa_id_ctx *id_ctx,
struct sss_domain_info *subdom)
{
struct ipa_ad_server_ctx *iter;
struct sdap_domain *sdom;
IPA_SERVER_MODE) == false) {
return;
}
}
return;
}
/* terminate all requests for this subdomain so we can free it */
}
struct ipa_id_ctx *id_ctx)
{
char *realm;
char *hostname;
IPA_SERVER_MODE) == false) {
return EOK;
}
/* The IPA code relies on the default FQDN format to unparse user
* names. Warn loudly if the full_name_format was customized on the
* IPA server
*/
CONFDB_DEFAULT_FULL_NAME_FORMAT_INTERNAL) != 0)) {
"lookups of subdomain users will likely fail!\n",
"lookups of subdomain users will likely fail!\n",
/* Attempt to continue */
}
return EINVAL;
}
return EINVAL;
}
return ENOMEM;
}
return ret;
}
return EOK;
}