}
}
-void setupPrivilegeGroups(const privileges_t &privileges, const std::vector<std::string> &groups)
-{
- TestSecurityManagerDatabase db;
- for (const auto &privilege : privileges) {
- db.setup_privilege_groups(privilege, groups);
- }
-}
-
std::vector<std::string> readPrivilegeGroups()
{
std::vector<std::string> groups;
RUNNER_TEST(security_manager_22_groups_get)
{
- setupPrivilegeGroups(SM_ALLOWED_PRIVILEGES, SM_ALLOWED_GROUPS);
-
std::unordered_set<std::string> groups;
auto tmp = readPrivilegeGroups();
groups.insert(tmp.begin(), tmp.end());
- groups.insert(SM_ALLOWED_GROUPS.begin(), SM_ALLOWED_GROUPS.end());
char ** c_groups;
size_t count = 0;