On 03/22/2016 09:16 PM, Jakub Hrozek wrote:
> On 22 Mar 2016, at 14:46, Lukas Slebodnik <lslebodn(a)redhat.com> wrote:
>>>
>>> SSSD would automatically pick up files ending
>>> in .conf from that direcory and use them. In
>>> order to disable the config file, the admin will
>>> have to rename the file ending (for example
>>> .conf.disabled). This way, we do not need to
>>> inspect the snippets for any special options
>>> like 'enable_this_snippet = true' which would
>>> just complicate the processing.
>>>
> Another, way how to ignore snippet is to ignore
> any file which start with dot ".".
> "hiddent files". It would avoid adding suffix to every file.
>
> BTW logrotate and crond do the same
> /etc/logrotate.d/
> /etc/cron.d/
>
+1 I would expect any decent software to ignore hidden files. The question is, should
sssd ignore them or should libini_config?
libini does not provide API to merge config objects in bulk, so we need
to do it file by file and than call merge function on each.
We could add function to libini that reads all config files
in a directory in alphabetical order and merges them in that order.
Such function could have a parameter to ignore hidden files.
With current libini API we would need to do it in SSSD.
Should we add such function to libini?