diff --git a/src/main.c b/src/main.c
index be757d7..7402665 100644
--- a/src/main.c
+++ b/src/main.c
static void check_config(GKeyFile *config)
{
+ const char *valid_groups[] = { "General", "Policy", NULL };
char **keys;
int i;
keys = g_key_file_get_groups(config, NULL);
for (i = 0; keys != NULL && keys[i] != NULL; i++) {
- if (!g_str_equal(keys[i], "General"))
+ const char **group;
+ bool match = false;
+
+ for (group = valid_groups; *group; group++) {
+ if (g_str_equal(keys[i], *group)) {
+ match = true;
+ break;
+ }
+ }
+
+ if (!match)
warn("Unknown group %s in main.conf", keys[i]);
}