]> git.ipfire.org Git - thirdparty/krb5.git/commit
Do not reload a modified profile data object 1337/head
authorGreg Hudson <ghudson@mit.edu>
Tue, 16 Apr 2024 06:14:29 +0000 (02:14 -0400)
committerGreg Hudson <ghudson@mit.edu>
Sun, 21 Apr 2024 00:37:19 +0000 (20:37 -0400)
commit9b2fb80ad24006784170875709a04dc79e03b401
treebf75114c01330abed4ee62b2af264823d39f3230
parentf951625e6bd3ff44f1056958b56e35a1a043e362
Do not reload a modified profile data object

The profile library normally attempts to reload a profile data tree if
the backing file has changed.  Reloading a dirty profile object
discards any modifications made by the caller.  If we assume that the
modifications are destined to be flushed back out to the backing file,
then there is no good answer--one or the other set of changes will be
lost.  But the caller may have a different intended use for the
modified tree (profile_flush_to_file(), profile_flush_to_buffer(),
krb5_init_context_profile()), for which the caller's modifications may
be critical.  Avoid discarding in-memory edits to ensure the
correctness of these use cases.

ticket: 9118
src/util/profile/prof_file.c