On (01/09/16 14:28), Michal Židek wrote: >On 09/01/2016 02:13 PM, Lukas Slebodnik wrote: >> On (01/09/16 13:15), Michal Židek wrote: >> > Hi, >> > >> > see the attached ding-libs patch for ticket #3166. >> > >> > This is how sssctl config-check prints the merging >> > issues without this patch: >> > >> > Messages generated during configuration merging: 2 >> > File blaa did not match provided patterns. Skipping. >> > File /etc/sssd/conf.d/blaa.conf did not pass access check. Skipping. >> > >> > And with the patch: >> > >> > Messages generated during configuration merging: 2 >> > File /etc/sssd/conf.d/blaa did not match provided patterns. Skipping. >> > File /etc/sssd/conf.d/blaa.conf did not pass access check. Skipping. >> > >> > Michal >> >> > From 85f54a943d65bd5e9c7863877288ddede8496154 Mon Sep 17 00:00:00 2001 >> > From: =?UTF-8?q?Michal=20=C5=BDidek?= <mzi...@redhat.com> >> > Date: Thu, 1 Sep 2016 12:59:07 +0200 >> > Subject: [PATCH] ini_augment: Use full path when reporting pattern mismatch >> > >> > We used full path name when reporting access check >> > failures but only write filename when reporting >> > on pattern mismatch. This inconsistency does not >> > look good when the messages are used in sssctl >> > config-check. >> > >> > Resolves: >> > https://fedorahosted.org/sssd/ticket/3166 >> > --- >> > ini/ini.d/merge.validator | 16 ++++++++-------- >> > ini/ini_augment.c | 3 ++- >> > 2 files changed, 10 insertions(+), 9 deletions(-) >> > >> > diff --git a/ini/ini.d/merge.validator b/ini/ini.d/merge.validator >> > index dc6d6aa..1defe8e 100644 >> > --- a/ini/ini.d/merge.validator >> > +++ b/ini/ini.d/merge.validator >> > @@ -1,11 +1,11 @@ >> > -File merge.validator did not match provided patterns. Skipping. >> > -File real8.conf did not match provided patterns. Skipping. >> > -File new_line.conf did not match provided patterns. Skipping. >> > -File real32be.conf did not match provided patterns. Skipping. >> > -File real32le.conf did not match provided patterns. Skipping. >> > -File real16be.conf did not match provided patterns. Skipping. >> > -File real16le.conf did not match provided patterns. Skipping. >> > -File foo.conf.in did not match provided patterns. Skipping. >> > +File %s%s/merge.validator did not match provided patterns. Skipping. >> > +File %s%s/real8.conf did not match provided patterns. Skipping. >> > +File %s%s/new_line.conf did not match provided patterns. Skipping. >> > +File %s%s/real32be.conf did not match provided patterns. Skipping. >> > +File %s%s/real32le.conf did not match provided patterns. Skipping. >> > +File %s%s/real16be.conf did not match provided patterns. Skipping. >> > +File %s%s/real16le.conf did not match provided patterns. Skipping. >> > +File %s%s/foo.conf.in did not match provided patterns. Skipping. >> > Errors detected while parsing: %s%s/comment.conf. >> > Error (9) on line 22: Invalid space character at the beginning of the line. >> > Error (9) on line 24: Invalid space character at the beginning of the line. >> > diff --git a/ini/ini_augment.c b/ini/ini_augment.c >> > index ea3d3da..cced53b 100644 >> > --- a/ini/ini_augment.c >> > +++ b/ini/ini_augment.c >> > @@ -470,10 +470,11 @@ static int ini_aug_construct_list(char *dirname , >> > } >> > } >> > else { >> > + snprintf(fullname, PATH_MAX, "%s/%s", dirname, entry->d_name); >> Is there any reason why you cannot use functions from libpath_utils ? >> >> LS > >This is the method used in the same function already. > Does it mean is good? libini_config is already linked with libpath_utils.so
[root@graviton ~]# objdump -p /usr/lib64/libini_config.so | grep -i path_utils NEEDED libpath_utils.so.1 required from libpath_utils.so.1: 0x076ed981 0x00 16 PATH_UTILS_0.2.1 LS _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/sssd-devel@lists.fedorahosted.org