/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2016 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 <talloc.h>
#include <tevent.h>
#include "sbus/sssd_dbus.h"
#include "sbus/sssd_dbus_errors.h"
#include "providers/data_provider/dp_private.h"
#include "providers/data_provider/dp_iface.h"
static errno_t
const char **services,
int *_count)
{
int count;
count = 0;
return ENOMEM;
}
count++;
}
return EOK;
}
static errno_t
struct sss_domain_info *domain,
const char **services,
int *_count)
{
int count;
if (fo_svc_name == NULL) {
goto done;
}
count = 0;
/* Drop each sd_gc_* since this service is not used with AD at all,
* we only connect to AD_GC for global catalog. */
continue;
}
/* Drop all subdomain services for different domain. */
if (!IS_SUBDOMAIN(domain)) {
continue;
}
continue;
}
}
if (IS_SUBDOMAIN(domain)) {
/* Drop AD since we connect to subdomain.com for LDAP. */
continue;
}
}
goto done;
}
count++;
}
done:
return ret;
}
static errno_t
struct sss_domain_info *domain,
const char **services,
int *_count)
{
int count;
if (fo_svc_name == NULL) {
goto done;
}
if (fo_gc_name == NULL) {
goto done;
}
count = 0;
/* Drop all subdomain services for different domain. */
if (!IS_SUBDOMAIN(domain)) {
continue;
}
continue;
}
}
return ENOMEM;
}
count++;
}
done:
return ret;
}
enum dp_fo_svc_type {
DP_FO_SVC_LDAP = 0,
};
void *dp_cli,
const char *domname)
{
const char **services;
int num_services;
if (SBUS_IS_STRING_EMPTY(domname)) {
} else {
"Unknown domain %s", domname);
return EOK;
}
}
/**
* Returning list of failover services is currently rather difficult
* since there is only one failover context for the whole backend.
*
* The list of services for the given domain depends on whether it is
* a master domain or a subdomain and whether we are using IPA, AD or
* LDAP backend.
*
* For LDAP we just return everything we have.
* For AD master domain we return AD, AD_GC.
* For AD subdomain we return subdomain.com, AD_GC.
* For IPA in client mode we return IPA.
* For IPA in server mode we return IPA for master domain and
* subdomain.com, gc_subdomain.com for subdomain.
*
* We also return everything else for all cases if any other service
* such as kerberos is configured separately.
*/
/* Allocate enough space. */
num_services = 0;
num_services++;
svc_type |= DP_FO_SVC_AD;
}
}
return ENOMEM;
}
/* Fill the list. */
switch (svc_type) {
case DP_FO_SVC_LDAP:
case DP_FO_SVC_MIXED:
break;
case DP_FO_SVC_AD:
services, &num_services);
break;
case DP_FO_SVC_IPA:
services, &num_services);
break;
default:
ret = ERR_INTERNAL;
break;
}
return ret;
}
return EOK;
}
void *dp_cli,
const char *service_name)
{
const char *server;
bool found = false;
found = true;
break;
}
}
if (!found) {
"Unknown service name");
return EOK;
}
server = "";
} else {
"Unable to get server name");
return EOK;
}
}
return EOK;
}
void *dp_cli,
const char *service_name)
{
const char **servers;
bool found = false;
found = true;
break;
}
}
if (!found) {
"Unknown service name");
return EOK;
}
return ENOMEM;
}
return EOK;
}