/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2013 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 "tests/cmocka/common_mock.h"
#include "tests/cmocka/common_mock_sysdb_objects.h"
enum sysdb_attr_type {
};
static enum sysdb_attr_type
{
/* Most attributes in sysdb are strings. Since this is only for the purpose
* of unit tests, we can safe ourselves some time and handle all attributes
* that are not listed amongst other types as string instead of invalid
* or unknown.
*/
static const char *table_bool[] = {
};
static const char *table_long[] = {
};
static const char *table_uint32[] = {
};
static const char *table_time[] = {
};
};
int i;
return type;
}
}
}
/* we didn't find the attribute, consider it as string */
return SYSDB_ATTR_TYPE_STRING;
}
static errno_t
{
switch (get_attr_type(attr)) {
case SYSDB_ATTR_TYPE_STRING:
break;
case SYSDB_ATTR_TYPE_BOOL:
/* _Bool is implicitly promoted to int in variadic functions */
break;
case SYSDB_ATTR_TYPE_LONG:
break;
case SYSDB_ATTR_TYPE_UINT32:
break;
case SYSDB_ATTR_TYPE_TIME:
break;
}
return ret;
}
}
return EOK;
}
struct sysdb_attrs *
const char *base_dn,
const char *name,
...)
{
goto fail;
}
goto fail;
}
goto fail;
}
goto fail;
}
goto fail;
}
return attrs;
fail:
return NULL;
}
struct sysdb_attrs *
const char *base_dn,
const char *name,
const char **members)
{
int i;
SYSDB_GIDNUM, gid);
return NULL;
}
return NULL;
}
}
}
return attrs;
}
struct sysdb_attrs *
const char *base_dn,
const char *name)
{
SYSDB_UIDNUM, uid);
}