prof_init.c, prof_tree.c: Fixed calls to profile_update_file/profile_open_file to...
authorAlexandra Ellwood <lxs@mit.edu>
Wed, 23 Jan 2002 15:55:53 +0000 (15:55 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Wed, 23 Jan 2002 15:55:53 +0000 (15:55 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14116 dc483132-0cff-0310-8789-dd5450dbe970

src/util/profile/ChangeLog
src/util/profile/prof_init.c
src/util/profile/prof_tree.c

index 50b71cbb02e9b21d1f27a9ad76158500353b2a1c..d3dd6e75e6d1d7eb709fa51ca24ba96748edf774 100644 (file)
@@ -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
index d939d26641d578aa9a48f1f2a2cfdbe7ade88835..f94833a7bc203a9a0f2d97f142ba4416b4e8a79b 100644 (file)
@@ -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) {
index 66fd4af822bd157e73a980ab739fd5929813677b..5c4e998bf0854bc2282a1ef2f95f312836024e9b 100644 (file)
@@ -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;
                /*