Skip Menu |
 

Subject: profile library mishandles duplicate subsections
In krb5.conf, if you specify the same top-level section (like [realms])
multiple times, you get the same section node each time, because
parse_std_line calls profile_find_node_subsection before
profile_add_node.

But when the parser reads a subsection name, it blindly calls
profile_add_node. If the subsection already exists, profile_add_node
creates a second subsection with the same name, which will be invisible
to searches.
From: ghudson@mit.edu
Subject: git commit

Merge duplicate subsections in profile library

Modify profile_add_node() to return the existing node, rather than
making a new one, when adding subsection configuration.

This fixes an issue where the first instance of a subsection will hide
the second instance entirely. In particular, it was previously
impossible to split realm-specific configuration across multiple
config files.

[ghudson@mit.edu: adjusted style, added test case]

https://github.com/krb5/krb5/commit/efab9fa5a6d23c486467264e20b58bf5a9c60f0c
Author: Robbie Harwood <rharwood@redhat.com>
Committer: Greg Hudson <ghudson@mit.edu>
Commit: efab9fa5a6d23c486467264e20b58bf5a9c60f0c
Branch: master
src/util/profile/prof_test1 | 22 ++++++++++++++++++++++
src/util/profile/prof_tree.c | 15 +++++++++++----
src/util/profile/test.ini | 6 ++++++
3 files changed, 39 insertions(+), 4 deletions(-)
From: ghudson@mit.edu
Subject: git commit

Merge duplicate subsections in profile library

Modify profile_add_node() to return the existing node, rather than
making a new one, when adding subsection configuration.

This fixes an issue where the first instance of a subsection will hide
the second instance entirely. In particular, it was previously
impossible to split realm-specific configuration across multiple
config files.

[ghudson@mit.edu: adjusted style, added test case]

(cherry picked from commit efab9fa5a6d23c486467264e20b58bf5a9c60f0c)

https://github.com/krb5/krb5/commit/98d0061c8083af960438ad1ac088f60497694a68
Author: Robbie Harwood <rharwood@redhat.com>
Committer: Greg Hudson <ghudson@mit.edu>
Commit: 98d0061c8083af960438ad1ac088f60497694a68
Branch: krb5-1.16
src/util/profile/prof_test1 | 22 ++++++++++++++++++++++
src/util/profile/prof_tree.c | 15 +++++++++++----
src/util/profile/test.ini | 6 ++++++
3 files changed, 39 insertions(+), 4 deletions(-)
From: ghudson@mit.edu
Subject: git commit

Merge duplicate subsections in profile library

Modify profile_add_node() to return the existing node, rather than
making a new one, when adding subsection configuration.

This fixes an issue where the first instance of a subsection will hide
the second instance entirely. In particular, it was previously
impossible to split realm-specific configuration across multiple
config files.

[ghudson@mit.edu: adjusted style, added test case]

(cherry picked from commit efab9fa5a6d23c486467264e20b58bf5a9c60f0c)

https://github.com/krb5/krb5/commit/07596ce5ec6a3491230b0e435b4b124473963aa8
Author: Robbie Harwood <rharwood@redhat.com>
Committer: Greg Hudson <ghudson@mit.edu>
Commit: 07596ce5ec6a3491230b0e435b4b124473963aa8
Branch: krb5-1.15
src/util/profile/prof_test1 | 22 ++++++++++++++++++++++
src/util/profile/prof_tree.c | 15 +++++++++++----
src/util/profile/test.ini | 6 ++++++
3 files changed, 39 insertions(+), 4 deletions(-)