/*
Authors:
Jakub Hrozek <jhrozek@redhat.com>
Copyright (C) 2013 Red Hat
SSSD tests: Common utilities for tests that exercise domains
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 <errno.h>
#include <ldb_module.h>
/* Including private header makes sure we can initialize test domains. */
#include "db/sysdb_private.h"
static errno_t
const char *tests_path,
const char *cdb_file,
struct confdb_ctx **_cdb)
{
return ENOMEM;
}
goto done;
}
/* connect to the confdb */
goto done;
}
done:
return ret;
}
static errno_t
struct confdb_ctx *cdb,
const char *db_path,
const char *name,
const char *id_provider,
struct sss_test_conf_param *params,
char **_cdb_path)
{
bool exists = false;
int i;
return ENOMEM;
}
/* get current domain list */
goto done;
}
/* check if the domain is already in */
goto done;
}
exists = true;
break;
}
}
}
/* add domain to the list of enabled domains */
if (!exists) {
} else {
}
goto done;
}
goto done;
}
}
/* create domain section */
goto done;
}
val[0] = id_provider;
goto done;
}
goto done;
}
}
}
}
done:
return ret;
}
{
}
}
static errno_t
struct confdb_ctx *cdb,
const char *db_path,
const char *name,
struct sss_domain_info **_domain)
{
/* initialize sysdb */
goto done;
}
/* init with an AD-style regex to be able to test flat name */
"(((?P<domain>[^\\\\]+)\\\\(?P<name>.+$))|" \
"((?P<name>[^@]+)@(?P<domain>.+$))|" \
"(^(?P<name>[^@\\\\]+)$))",
goto done;
}
}
done:
}
return ret;
}
struct sss_test_ctx *
const char *tests_path,
const char *cdb_file,
const char **domains,
const char *id_provider,
struct sss_test_conf_param *params)
{
int i;
goto fail;
}
goto fail;
}
/* create confdb objects for the domains */
goto fail;
}
}
/* initialize domain list and sysdb of the domains */
goto fail;
}
}
/* the first domain we obtained is already head of the complete list */
/* set data from the first domain */
return test_ctx;
fail:
return NULL;
}
struct sss_test_ctx *
const char *tests_path,
const char *confdb_path,
const char *domain_name,
const char *id_provider,
struct sss_test_conf_param *params)
{
}
const char *cdb_file,
const char **domains)
{
int i;
return;
}
goto done;
}
errno = 0;
}
}
/* local domain */
&sysdb_path, &sysdb_ts_path);
goto done;
}
} else {
/* The mocked database doesn't really care about its provider type, just
* distinguishes between a local and non-local databases
*/
&sysdb_path, &sysdb_ts_path);
goto done;
}
}
if (sysdb_path == NULL) {
goto done;
}
errno = 0;
}
if (sysdb_ts_path) {
errno = 0;
}
}
}
}
errno = 0;
}
done:
}
const char *cdb_file,
const char *domain)
{
}
const char *name,
struct sss_domain_info *parent)
{
return NULL;
}
return NULL;
}
return dom;
}