17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina/*
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina Authors:
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina Pavel Březina <pbrezina@redhat.com>
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina Copyright (C) 2013 Red Hat
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina This program is free software; you can redistribute it and/or modify
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina it under the terms of the GNU General Public License as published by
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina the Free Software Foundation; either version 3 of the License, or
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina (at your option) any later version.
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina This program is distributed in the hope that it will be useful,
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina but WITHOUT ANY WARRANTY; without even the implied warranty of
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina GNU General Public License for more details.
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina You should have received a copy of the GNU General Public License
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina along with this program. If not, see <http://www.gnu.org/licenses/>.
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina*/
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina#ifndef COMMON_MOCK_SYSDB_OBJECTS_H_
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina#define COMMON_MOCK_SYSDB_OBJECTS_H_
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina#include <talloc.h>
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina#include "util/util.h"
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina#include "providers/ldap/sdap.h"
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březinastruct sysdb_attrs *
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina_mock_sysdb_object(TALLOC_CTX *mem_ctx,
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina const char *base_dn,
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina const char *name,
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina ...);
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina#define mock_sysdb_object(mem_ctx, base_dn, name, ...) \
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina _mock_sysdb_object(mem_ctx, base_dn, name, ##__VA_ARGS__, NULL)
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březinastruct sysdb_attrs *
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březinamock_sysdb_group_rfc2307bis(TALLOC_CTX *mem_ctx,
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina const char *base_dn,
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina gid_t gid,
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina const char *name,
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina const char **members);
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina
b0fb84bb4a98d3086b78550c737ef20f63cbac26Jakub Hrozekstruct sysdb_attrs *
b0fb84bb4a98d3086b78550c737ef20f63cbac26Jakub Hrozekmock_sysdb_user(TALLOC_CTX *mem_ctx,
b0fb84bb4a98d3086b78550c737ef20f63cbac26Jakub Hrozek const char *base_dn,
b0fb84bb4a98d3086b78550c737ef20f63cbac26Jakub Hrozek uid_t uid,
b0fb84bb4a98d3086b78550c737ef20f63cbac26Jakub Hrozek const char *name);
b0fb84bb4a98d3086b78550c737ef20f63cbac26Jakub Hrozek
17d37aecdf397fcb7a1d0c75adebdb25d7be112ePavel Březina#endif /* COMMON_MOCK_SYSDB_OBJECTS_H_ */