aboutsummaryrefslogtreecommitdiffstats
path: root/rcfile_y.y
diff options
context:
space:
mode:
Diffstat (limited to 'rcfile_y.y')
-rw-r--r--rcfile_y.y12
1 files changed, 11 insertions, 1 deletions
diff --git a/rcfile_y.y b/rcfile_y.y
index 8091b7c7..4cb0b5a4 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -428,7 +428,17 @@ int prc_parse_file (const char *pathname, const flag securecheck)
if ( (prc_errflag = prc_filecheck(pathname, securecheck)) != 0 )
return(prc_errflag);
- if (errno == ENOENT)
+ /*
+ * Croak if the configuration directory does not exist.
+ * This probably means an NFS mount failed and we can't
+ * see a configuration file that ought to be there.
+ * Question: is this a portable check? It's not clear
+ * that all implementations of lstat() will return ENOTDIR
+ * rather than plain ENOENT in this case...
+ */
+ if (errno == ENOTDIR)
+ return(PS_IOERR);
+ else if (errno == ENOENT)
return(PS_SUCCESS);
/* Open the configuration file and feed it to the lexer. */