mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-03-07 07:17:00 +08:00
config: skip unknown sections
This would allow future extensibility, by making clients which don't support a section to skip it. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
This commit is contained in:
@@ -92,6 +92,11 @@ static int group_cfg_ini_handler(void *_ctx, const char *section, const char *na
|
||||
int ret;
|
||||
char *value;
|
||||
|
||||
if (section != NULL && section[0] != 0) {
|
||||
syslog(LOG_INFO, "skipping unknown section '%s' in %s", section, file);
|
||||
return 0;
|
||||
}
|
||||
|
||||
value = sanitize_config_value(ctx->pool, _value);
|
||||
if (value == NULL)
|
||||
return 0;
|
||||
@@ -187,7 +192,7 @@ static int group_cfg_ini_handler(void *_ctx, const char *section, const char *na
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
syslog(LOG_ERR, "skipping unknown option '%s' in %s", name, file);
|
||||
syslog(LOG_INFO, "skipping unknown option '%s' in %s", name, file);
|
||||
}
|
||||
|
||||
talloc_free(value);
|
||||
|
||||
Reference in New Issue
Block a user