diff options
Diffstat (limited to 'nslcd/cfg.c')
-rw-r--r-- | nslcd/cfg.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/nslcd/cfg.c b/nslcd/cfg.c index e3f5b9d..086427c 100644 --- a/nslcd/cfg.c +++ b/nslcd/cfg.c @@ -392,6 +392,24 @@ static void handle_validnames(const char *filename, int lnr, free(value); } +static void handle_yamldir( + const char *filename, int lnr, + const char *keyword, char *line, struct nslcd_config *cfg) +{ + char *value; + int l; + /* the rest of the line should be a message */ + value = get_linedup(filename, lnr, keyword, &line); + /* strip quotes if they are present */ + l = strlen(value); + if ((value[0] == '\"') && (value[l - 1] == '\"')) + { + value[l - 1] = '\0'; + value++; + } + cfg->yamldir = value; +} + static void handle_pam_password_prohibit_message( const char *filename, int lnr, const char *keyword, char *line, struct nslcd_config *cfg) @@ -502,6 +520,11 @@ static void cfg_read(const char *filename, struct nslcd_config *cfg) /* get keyword from line and ignore empty lines */ if (get_token(&line, keyword, sizeof(keyword)) == NULL) continue; + /* main options */ + if (strcasecmp(keyword, "yamldir") == 0) + { + handle_yamldir(filename, lnr, keyword, line, cfg); + } /* runtime options */ if (strcasecmp(keyword, "threads") == 0) { |