From cc1e481c2e987c2c21dcafbc372bffc8aa09000e Mon Sep 17 00:00:00 2001 From: Alexey Tikhonov Date: Wed, 23 Oct 2024 20:59:32 +0200 Subject: [PATCH] INI: TODO --- src/util/sss_ini.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/util/sss_ini.c b/src/util/sss_ini.c index e989d8cafc6..a585546ea36 100644 --- a/src/util/sss_ini.c +++ b/src/util/sss_ini.c @@ -781,6 +781,32 @@ int sss_ini_open(struct sss_ini *self, return ret; } +static int access_check_file(const char *filename) +{ + /* TODO */ + + return EOK; +} + +static int access_check_ini(const struct sss_ini *self) +{ + int ret; + + const struct ref_array *ra_success; + + if (self->main_config_exists) { + const char *filename = ini_config_get_filename(self->file); + ret = access_check_file(filename); + if (ret != EOK) { + return ret; + } + } + + /* TODO: check snippet files */ + + return EOK; +} + int sss_ini_read_sssd_conf(struct sss_ini *self, const char *config_file, const char *config_dir) @@ -833,5 +859,7 @@ int sss_ini_read_sssd_conf(struct sss_ini *self, return ERR_INI_EMPTY_CONFIG; } + ret = access_check_ini(self); + return ret; }