[28488] in CVS-changelog-for-Kerberos-V5
krb5 commit: Fix deleted node handling in libprofile
daemon@ATHENA.MIT.EDU (Greg Hudson)
Tue Jul 29 10:56:59 2014
Date: Tue, 29 Jul 2014 10:56:53 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201407291456.s6TEurpw028753@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/e7f50a1c11845ba73ce4ffa4729d10113563a247
commit e7f50a1c11845ba73ce4ffa4729d10113563a247
Author: Greg Hudson <ghudson@mit.edu>
Date: Wed Jul 16 16:02:21 2014 -0400
Fix deleted node handling in libprofile
In profile_find_node, skip deleted nodes when finding the second
match. Otherwise, profile_clear_nodes could return an error if a node
has some values to clear but the last one is deleted.
In profile_node_iterator, skip deleted nodes when looking up the
section names. Otherwise we could iterate over a deleted section
and/or ignore its replacement.
ticket: 7971 (new)
target_version: 1.12.2
tags: pullup
src/util/profile/prof_tree.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/util/profile/prof_tree.c b/src/util/profile/prof_tree.c
index cc5bdfd..081f688 100644
--- a/src/util/profile/prof_tree.c
+++ b/src/util/profile/prof_tree.c
@@ -294,6 +294,8 @@ errcode_t profile_find_node(struct profile_node *section, const char *name,
if (value && (strcmp(p->value, value)))
continue;
}
+ if (p->deleted)
+ continue;
/* A match! */
break;
}
@@ -519,7 +521,7 @@ get_new_file:
assert(section != NULL);
for (cpp = iter->names; cpp[iter->done_idx]; cpp++) {
for (p=section->first_child; p; p = p->next) {
- if (!strcmp(p->name, *cpp) && !p->value)
+ if (!strcmp(p->name, *cpp) && !p->value && !p->deleted)
break;
}
if (!p) {
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5