Always stat profile files after reopening them
authorWill Fiveash <will.fiveash@oracle.com>
Wed, 19 Mar 2014 21:48:15 +0000 (16:48 -0500)
committerGreg Hudson <ghudson@mit.edu>
Thu, 20 Mar 2014 21:25:12 +0000 (17:25 -0400)
Some applications write a profile file and then immediately use it via
a krb5_context.  If we have a cached copy of the profile we wrote,
make sure to update it by forcing a stat when we reuse an existing
prf_data_t object.

[ghudson@mit.edu: commit message]

ticket: 7884

src/util/profile/prof_file.c

index 76411db8ab3c73fc9d218dd0df6f6345c47a5f48..56112337047e93006342cd47033fd37dfa473e66 100644 (file)
@@ -249,6 +249,7 @@ errcode_t profile_open_file(const_profile_filespec_t filespec,
     }
     if (data) {
         data->refcount++;
+        data->last_stat = 0;    /* Make sure to stat when updating. */
         k5_mutex_unlock(&g_shared_trees_mutex);
         retval = profile_update_file_data(data, NULL);
         free(expanded_filename);