#18 INI Parser needs a way to return a list of available sections
Closed: Fixed None Opened 15 years ago by sgallagh.

The INI parser can read in an INI file and it can retrieve specific entries from a section, but it needs two additional features urgently.

In a config file, there will not always be a fixed number of sections, so we need a function to return an array of strings listing all the section names present in the collection.

Furthermore, there will not always be a fixed number of attributes present in a particular setting (for example, in the SSSD we will only include the "command" attribute for a service if we want to call a binary other than the default)

So we need:

inicfg_get_sections(struct collection_item *ini_config,
                    char ***section_array, int *section_count);

inicfg_get_attributes(struct collection_item *ini_config,
                      const char *section,
                      char ***attributes, int *attr_count);

Fields changed

description: The INI parser can read in an INI file and it can retrieve specific entries from a section, but it needs two additional features urgently.

In a config file, there will not always be a fixed number of sections, so we need a function to return an array of strings listing all the section names present in the collection.

Furthermore, there will not always be a fixed number of attributes present in a particular setting (for example, in the SSSD we will only include the "command" attribute for a service if we want to call a binary other than the default)

So we need:
inicfg_get_sections(struct collection_item ini_config,
char
*section_array, int section_count);

inicfg_get_attributes(struct collection_item ini_config,
const char
section,
char **attributes, int attr_count); => The INI parser can read in an INI file and it can retrieve specific entries from a section, but it needs two additional features urgently.

In a config file, there will not always be a fixed number of sections, so we need a function to return an array of strings listing all the section names present in the collection.

Furthermore, there will not always be a fixed number of attributes present in a particular setting (for example, in the SSSD we will only include the "command" attribute for a service if we want to call a binary other than the default)

So we need:
{{{
inicfg_get_sections(struct collection_item ini_config,
char
*section_array, int section_count);

inicfg_get_attributes(struct collection_item ini_config,
const char
section,
char **attributes, int attr_count);
}}}

Fields changed

status: new => assigned

Functions have been provided.

resolution: => fixed
status: assigned => closed

Fields changed

rhbz: => 0

Metadata Update from @sgallagh:
- Issue assigned to dpal
- Issue set to the milestone: Iteration 3

7 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/1060

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.

Metadata