summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexandra Ellwood <lxs@mit.edu>2002-01-23 15:55:53 +0000
committerAlexandra Ellwood <lxs@mit.edu>2002-01-23 15:55:53 +0000
commit4df3816b982e8fc1893a492e02182570dcf34789 (patch)
treefda764a5179df7e6677827ca93ad5798a8139617 /src
parent14636969c6aea9e6fa38a76346d310b7b1ec39da (diff)
downloadkrb5-4df3816b982e8fc1893a492e02182570dcf34789.tar.gz
krb5-4df3816b982e8fc1893a492e02182570dcf34789.tar.xz
krb5-4df3816b982e8fc1893a492e02182570dcf34789.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/util/profile/ChangeLog7
-rw-r--r--src/util/profile/prof_init.c2
-rw-r--r--src/util/profile/prof_tree.c11
3 files changed, 17 insertions, 3 deletions
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 <lxs@mit.edu>
+
+ * 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 <epeisach@mit.edu>
* 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;
/*