[krbdev.mit.edu #1312] [Comment] profile locking at wrong level when re-reading file
"Greg Hudson via RT" <[email protected]> Tue, 16 Apr 2024 02:03:51 -0400
| Newsgroups | gmane.comp.encryption.kerberos.bugs |
|---|---|
| Message-ID | <rt-4.4.3-2-2055280-1713247430-1948.1312-8-0@kerborg-prod-app-1.mit.edu> |
http://kerborg-prod-app-1.mit.edu/rt/Ticket/Display.html?id=1312 This is a comment. It is not sent to the Requestor(s): * prof_int.h (struct _prf_data_t): Add a mutex. * prof_file.c (profile_open_file): Initialize data mutex. (profile_update_file_data, profile_flush_file_data): Lock it while manipulating file data. (profile_lock_global, profile_unlock_global): New functions. * prof_set.c (rw_setup): Acquire global lock while checking flags and adjusting ref count. (profile_update_relation, profile_rename_section, profile_add_relation): Lock data mutex while manipulating profile data. * prof_tree.c (profile_node_iterator): Do more magic number tests. https://github.com/krb5/krb5/commit/b06c64321b0cef679623d264f19ba64e625d1f32 Author: Ken Raeburn <[email protected]> Commit: b06c64321b0cef679623d264f19ba64e625d1f32 Branch: master src/util/profile/ChangeLog | 15 +++++++ src/util/profile/prof_file.c | 60 +++++++++++++++++++++----- src/util/profile/prof_int.h | 8 ++++ src/util/profile/prof_set.c | 100 +++++++++++++++++++++++++++---------------- src/util/profile/prof_tree.c | 9 +++- 5 files changed, 142 insertions(+), 50 deletions(-)