On (23/03/16 12:16), Michal Židek wrote:
On 03/23/2016 11:04 AM, Michal Židek wrote:
>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?
I am taking it back, there is a function in libini
that merges files in bulk. So no need to add a new one.
The function does all we need.
Sorry for incorrect info.
Of course :-)
https://pagure.io/gssproxy/f2385558dd9542ca0a88f3386aa5833a23e5eb8b
LS