sysdb-tests.c revision ace07a7d75c5a7c3f5613e5349fa8c1ffd05863a
2810N/A along with this program. If not, see <http://www.gnu.org/licenses/>.
2900N/A#include "confdb/confdb_setup.h"
2810N/A#include "db/sysdb_private.h"
2810N/Astruct sysdb_test_ctx {
int ret;
return EFAULT;
return ENOMEM;
return EIO;
return ENOMEM;
return ret;
return ret;
return ret;
return ret;
return ret;
return ret;
return ret;
return EOK;
struct test_data {
const char *username;
const char *groupname;
const char *netgrname;
const char *shell;
bool finished;
int error;
const char **attrlist;
char *homedir;
char *gecos;
int ret;
NULL, 0);
return ret;
char *homedir;
char *gecos;
int ret;
return ret;
int ret;
return ret;
int ret;
return ret;
int ret;
return ret;
int ret;
return ret;
int ret;
return ret;
int ret;
return ret;
int ret;
return ret;
int ret;
return ret;
int ret;
return ret;
int ret;
return ret;
const char *username;
int ret;
return ENOMEM;
return ret;
const char *username;
int ret;
return ENOMEM;
return ret;
char *object_name;
int ret;
if (!object_name) {
return ENOMEM;
return ret;
int ret;
return ret;
int ret;
return ENOMEM;
return ret;
int ret;
if (!dn) {
return ENOMEM;
return ret;
int ret;
char *member;
if (!attrs) {
return ENOMEM;
if (!member) {
return ENOMEM;
return ret;
return ret;
const char *description;
int ret;
return ret;
int ret;
return ret;
int ret;
return ret;
int ret;
const char *description;
if (!attrs) {
return ENOMEM;
if (ret) {
return ret;
return ret;
int ret;
int ret;
int ret;
int ret;
int ret;
int ret;
int ret;
int ret;
int ret;
int ret;
const char *username;
int ret;
if (ret) {
goto done;
goto done;
if (ret) {
goto done;
done:
const char *groupname;
int ret;
if (ret) {
goto done;
goto done;
if (ret) {
goto done;
done:
const char *e_groupname;
const char *groupname;
int ret;
if (ret) {
goto done;
goto done;
done:
const char *e_username;
const char *username;
int ret;
if (ret) {
goto done;
goto done;
done:
int ret;
&res);
int ret;
&res);
int ret;
const char *attrval;
char *username;
int ret;
if (ret) {
goto done;
done:
int ret;
int ret;
int ret;
int ret;
int ret;
int ret;
char *object_name;
int ret;
int ret;
char *object_name;
int ret;
int ret;
int ret;
const char *password,
int expected_result)
int ret;
0, expire_date);
const char *password,
int expected_result)
int ret;
char *username;
char *username;
char *username;
int ret;
int ret;
char *gid_str;
for (i = 0; i < msgs_count; i++) {
int ret;
char *uid_str;
int ret;
int ret;
int ret;
if (_i == 0) {
int ret;
int ret;
int ret;
int ret;
int ret;
int ret;
int ret;
char **list;
list[0]);
char **add_groups;
char **del_groups;
(const char *const *)add_groups,
(const char *const *)del_groups);
NULL,
(const char *const *)del_groups);
int ret;
const char *groupname;
char *parsed;
int ret;
int ret;
const char *netgrname;
int ret;
int ret;
int ret;
int ret;
const char *description;
const char *netgrname;
const char *attrval;
const char *netgrname;
const char *hostname;
const char *username;
const char *domainname;
&res);
const char *netgrname;
const char *hostname;
const char *username;
const char *domainname;
&res);
const char *netgrname;
const char *membername;
char *hostname1;
char *username1;
char *domainname1;
char *hostname2;
char *username2;
char *domainname2;
&res);
const char *netgrname;
const char *membername;
char *hostname;
char *username;
char *domainname;
&res);
const char *received_user;
const char *received_group;
bool enumerated;
&enumerated);
&enumerated);
const char *filter;
int opt;
int ret;
int failure_count;
int no_cleanup = 0;
switch(opt) {
return EXIT_FAILURE;
return EXIT_FAILURE;
return EXIT_FAILURE;
return EXIT_SUCCESS;
return EXIT_FAILURE;