ifp_components.c revision 62ebed8582285bd24efba92b9a06366511507946
/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2014 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 <string.h>
#include <talloc.h>
#include <signal.h>
#include <errno.h>
#include <utime.h>
#include "config.h"
#include "responder/common/responder.h"
#include "responder/ifp/ifp_components.h"
#ifdef HAVE_CONFIG_LIB
#include "util/sss_config.h"
#endif
enum component_type {
};
static bool responder_exists(const char *name)
{
const char * const *svc = get_known_services();
int i;
return true;
}
}
return false;
}
{
int i;
return false;
}
return true;
}
}
return false;
}
struct confdb_ctx *confdb,
const char *path,
enum component_type *_type,
char **_name)
{
enum component_type type;
return EINVAL;
}
goto done;
}
} else {
} else {
} else {
goto done;
}
}
}
goto done;
}
switch (type) {
case COMPONENT_MONITOR:
/* noop */
break;
case COMPONENT_RESPONDER:
if (!responder_exists(name)) {
goto done;
}
break;
case COMPONENT_BACKEND:
goto done;
}
break;
}
}
}
done:
}
return ret;
}
const char *name,
enum component_type type,
{
const char *confdb_path = NULL;
return ENOMEM;
}
switch (type) {
case COMPONENT_MONITOR:
break;
case COMPONENT_RESPONDER:
break;
case COMPONENT_BACKEND:
break;
}
if (confdb_path == NULL) {
goto done;
}
goto done;
}
goto done;
}
goto done;
}
/* reload the configuration */
goto done;
}
done:
return ret;
}
const char ***_list,
int *_num)
{
const char * const *svc = get_known_services();
int num;
int i;
goto done;
}
for (i = 0; i < num; i++) {
goto done;
}
}
done:
}
return ret;
}
struct confdb_ctx *confdb,
const char ***_list,
int *_num)
{
int num;
int i;
return ENOMEM;
}
goto done;
}
goto done;
}
for (i = 0; i < num; i++) {
goto done;
}
}
done:
return ret;
}
{
const char **responders = NULL;
int num_responders;
int num_backends;
int num;
int i;
goto done;
}
goto done;
}
goto done;
}
goto done;
}
result[0] = PATH_MONITOR;
for (i = 0; i < num_responders; i++) {
}
for (i = 0; i < num_backends; i++) {
}
done:
}
}
{
int num;
}
}
{
int num;
goto done;
}
done:
}
}
{
}
void *data,
const char *arg_name)
{
if (responder_exists(arg_name)) {
}
} else {
"Responder \"%s\" does not exist", arg_name);
}
}
void *data,
const char *arg_name)
{
}
}
} else {
"Backend \"%s\" does not exist", arg_name);
}
}
{
#ifndef HAVE_CONFIG_LIB
return sbus_request_fail_and_finish(dbus_req,
#else
enum component_type type;
goto done;
}
goto done;
}
if (config_ctx == NULL) {
goto done;
}
switch (type) {
case COMPONENT_MONITOR:
goto done;
break;
case COMPONENT_RESPONDER:
break;
case COMPONENT_BACKEND:
break;
}
goto done;
}
goto done;
}
done:
}
#endif
}
{
#ifndef HAVE_CONFIG_LIB
return sbus_request_fail_and_finish(dbus_req,
#else
enum component_type type;
goto done;
}
goto done;
}
if (config_ctx == NULL) {
goto done;
}
switch (type) {
case COMPONENT_MONITOR:
goto done;
break;
case COMPONENT_RESPONDER:
break;
case COMPONENT_BACKEND:
break;
}
goto done;
}
goto done;
}
done:
}
#endif
}
void *data,
{
#ifndef HAVE_CONFIG_LIB
return sbus_request_fail_and_finish(dbus_req,
#else
enum component_type type;
goto done;
}
goto done;
}
switch (type) {
case COMPONENT_MONITOR:
section = "sssd";
break;
case COMPONENT_RESPONDER:
break;
case COMPONENT_BACKEND:
break;
}
goto done;
}
if (config_ctx == NULL) {
goto done;
}
goto done;
}
goto done;
}
goto done;
}
done:
}
#endif
}
void *data,
{
enum component_type type;
goto done;
}
goto done;
}
goto done;
}
/* Touch configuration file to make sure debug level is reloaded. */
goto done;
}
done:
}
}
void *data,
const char **_out)
{
return;
}
return;
}
}
void *data,
{
const char *confdb_path = NULL;
enum component_type type;
int level;
*_out = 0;
return;
}
return;
}
switch (type) {
case COMPONENT_MONITOR:
break;
case COMPONENT_RESPONDER:
break;
case COMPONENT_BACKEND:
break;
}
if (confdb_path == NULL) {
return;
}
return;
}
}
void *data,
bool *_out)
{
enum component_type type;
int i;
*_out = false;
return;
}
return;
}
switch (type) {
case COMPONENT_MONITOR:
*_out = true;
return;
case COMPONENT_RESPONDER:
break;
case COMPONENT_BACKEND:
break;
}
return;
}
*_out = true;
return;
}
}
}
void *data,
const char **_out)
{
enum component_type type;
return;
}
return;
}
switch (type) {
case COMPONENT_MONITOR:
*_out = "monitor";
break;
case COMPONENT_RESPONDER:
*_out = "responder";
break;
case COMPONENT_BACKEND:
*_out = "backend";
break;
}
}
void *data,
const char ***_out,
int *_out_len)
{
const char *confdb_path = NULL;
enum component_type type;
static const char *providers[] = {CONFDB_DOMAIN_ID_PROVIDER,
int i;
int j;
*_out_len = 0;
return;
}
return;
}
return;
}
if (type != COMPONENT_BACKEND) {
return;
}
if (confdb_path == NULL) {
return;
}
return;
}
j = 0;
for (i = 0; i < num_providers; i++) {
return;
}
continue;
}
return;
}
j++;
}
*_out_len = j;
return;
}