+2004-11-04 Alexandra Ellwood <lxs@mit.edu>
+
+ * prof_init.c, profile.hin: added profile_is_modified
+ and profile_is_writable so that callers can check to see
+ if profile_release() will fail before calling it.
+
2004-11-04 Alexandra Ellwood <lxs@mit.edu>
* prof_set.c: profile calls which set values should not fail
return retval;
}
+errcode_t KRB5_CALLCONV
+profile_is_writable(profile_t profile, int *writable)
+{
+ if (!profile || profile->magic != PROF_MAGIC_PROFILE)
+ return PROF_MAGIC_PROFILE;
+
+ if (!writable)
+ return EINVAL;
+
+ if (profile->first_file)
+ *writable = (profile->first_file->data->flags & PROFILE_FILE_RW);
+
+ return 0;
+}
+
+errcode_t KRB5_CALLCONV
+profile_is_modified(profile_t profile, int *modified)
+{
+ if (!profile || profile->magic != PROF_MAGIC_PROFILE)
+ return PROF_MAGIC_PROFILE;
+
+ if (!modified)
+ return EINVAL;
+
+ if (profile->first_file)
+ *modified = (profile->first_file->data->flags & PROFILE_FILE_DIRTY);
+
+ return 0;
+}
+
errcode_t KRB5_CALLCONV
profile_flush(profile_t profile)
{
void KRB5_CALLCONV profile_free_buffer
(profile_t profile, char *buf);
+long KRB5_CALLCONV profile_is_writable
+ (profile_t profile, int *writable);
+long KRB5_CALLCONV profile_is_modified
+ (profile_t profile, int *modified);
+
void KRB5_CALLCONV profile_abandon
(profile_t profile);