summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorAlexandra Ellwood <lxs@mit.edu>2007-04-05 20:33:40 +0000
committerAlexandra Ellwood <lxs@mit.edu>2007-04-05 20:33:40 +0000
commit7c30487734fe5da0f0187d306a216b4077be14ef (patch)
treecccf23ae666c64a72c313876020f038910677b44 /src/util
parente8c89c41b5265cde00427299245b20e7c89b6722 (diff)
downloadkrb5-7c30487734fe5da0f0187d306a216b4077be14ef.tar.gz
krb5-7c30487734fe5da0f0187d306a216b4077be14ef.tar.xz
krb5-7c30487734fe5da0f0187d306a216b4077be14ef.zip
krb5int_open_plugin_dirs errors out if directory does not exist
If one of the directories in the list doesn't exist and no filenames are passed in because opendir fails and then the code gets an error. opendir() failing should not be a fatal error. The function should just move on to the next directory. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19400 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util')
-rw-r--r--src/util/support/plugins.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/util/support/plugins.c b/src/util/support/plugins.c
index bccb52250..b26726fab 100644
--- a/src/util/support/plugins.c
+++ b/src/util/support/plugins.c
@@ -455,17 +455,9 @@ krb5int_open_plugin_dirs (const char * const *dirnames,
} else {
/* load all plugins in each directory */
#ifndef _WIN32
- DIR *dir = NULL;
+ DIR *dir = opendir (dirnames[i]);
- if (!err) {
- dir = opendir(dirnames[i]);
- if (dir == NULL) {
- err = errno;
- Tprintf ("-> error %d/%s\n", err, strerror (err));
- }
- }
-
- while (!err) {
+ while (dir != NULL && !err) {
struct dirent *d = NULL;
char *filepath = NULL;
struct plugin_file_handle *handle = NULL;