From: Alexandra Ellwood Date: Wed, 23 Jan 2002 15:55:53 +0000 (+0000) Subject: prof_init.c, prof_tree.c: Fixed calls to profile_update_file/profile_open_file to... X-Git-Tag: krb5-1.3-alpha1~885 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4df3816b982e8fc1893a492e02182570dcf34789;p=krb5.git prof_init.c, prof_tree.c: Fixed calls to profile_update_file/profile_open_file to handle the possibility that we have lost permission to read one of the configuration files in the file list (say it's in AFS). We should only fail catastrophically if we can't read all of the files in the profile git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14116 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index 50b71cbb0..d3dd6e75e 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -1,3 +1,10 @@ +2002-01-23 Alexandra Ellwood + + * prof_init.c, prof_tree.c: Fixed calls to profile_update_file_data to handle + the possibility that we have lost permission to read one of the configuration + files in the file list. We should only fail catastrophically (EACCES) if we + can't read all of the files in the profile. + 2001-12-05 Ezra Peisach * test_profile.c (main): Call profile_release() before exiting diff --git a/src/util/profile/prof_init.c b/src/util/profile/prof_init.c index d939d2664..f94833a7b 100644 --- a/src/util/profile/prof_init.c +++ b/src/util/profile/prof_init.c @@ -46,7 +46,7 @@ profile_init(files, ret_profile) for (fs = files; !PROFILE_LAST_FILESPEC(*fs); fs++) { retval = profile_open_file(*fs, &new_file); /* if this file is missing, skip to the next */ - if (retval == ENOENT) { + if (retval == ENOENT || retval == EACCES) { continue; } if (retval) { diff --git a/src/util/profile/prof_tree.c b/src/util/profile/prof_tree.c index 66fd4af82..5c4e998bf 100644 --- a/src/util/profile/prof_tree.c +++ b/src/util/profile/prof_tree.c @@ -489,8 +489,15 @@ get_new_file: return 0; } if ((retval = profile_update_file(iter->file))) { - profile_node_iterator_free(iter_p); - return retval; + if (retval == ENOENT || retval == EACCES) { + iter->file = iter->file->next; + skip_num = 0; + retval = 0; + goto get_new_file; + } else { + profile_node_iterator_free(iter_p); + return retval; + } } iter->file_serial = iter->file->upd_serial; /*