]> git.ipfire.org Git - thirdparty/krb5.git/commit
Avoid rereading non-regular profile files 748/head
authorGreg Hudson <ghudson@mit.edu>
Mon, 19 Mar 2018 01:41:02 +0000 (21:41 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 20 Mar 2018 00:13:40 +0000 (20:13 -0400)
commit2c26419ad7ea4800995180292ce39db863672fa9
treecd538418c0955eb1a945d6f71adf82e2af710855
parent9dadcd682c1a9c47bbea8182d82faa89ede3daaf
Avoid rereading non-regular profile files

If a profile file is a special device such as a pipe, then reloading
it will cause us to discard its contents.  Repurpose the first
PROFILE_FILE flag bit to indicate that the file should not be
reloaded.  In profile_update_file_data_locked(), set the flag on the
first load if stat() doesn't indicate a regular file, and check the
flag before testing whether we need to perform any subsequent reload.

Later on in profile_update_file_data_locked(), specifically unset the
DIRTY flag rather than unsetting all flags other than SHARED, so that
we don't clear the NO_RELOAD flag.

ticket: 8651
src/util/profile/prof_file.c
src/util/profile/prof_int.h