summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-04-18 21:10:10 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2010-04-18 21:10:10 +0300
commit5157bbc99fc7cd3c0ea904f70ab2ee1f595ac8fe (patch)
tree5249ded6c42496f288af76b91d556c77f850d3ef
parent76c508f88d9026915072af5ebb4055dc121154d5 (diff)
downloadmailutils-5157bbc99fc7cd3c0ea904f70ab2ee1f595ac8fe.tar.gz
mailutils-5157bbc99fc7cd3c0ea904f70ab2ee1f595ac8fe.tar.bz2
Bugfix.
* mailbox/cfg_lexer.l (mu_cfg_parse_file): Parse only regular files.
-rw-r--r--mailbox/cfg_lexer.l8
1 files changed, 8 insertions, 0 deletions
diff --git a/mailbox/cfg_lexer.l b/mailbox/cfg_lexer.l
index f530ca223..998d84d9b 100644
--- a/mailbox/cfg_lexer.l
+++ b/mailbox/cfg_lexer.l
@@ -333,6 +333,14 @@ mu_cfg_parse_file (mu_cfg_tree_t **return_tree, const char *file, int flags)
free (full_name);
return ENOENT;
}
+ else if (!S_ISREG (st.st_mode))
+ {
+ if (flags & MU_PARSE_CONFIG_VERBOSE)
+ mu_diag_output (MU_DIAG_INFO, _("%s: not a regular file"), full_name);
+ free (full_name);
+ return ENOENT;
+ }
+
fp = fopen (full_name, "r");
if (!fp)
{

Return to:

Send suggestions and report system problems to the System administrator.