projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35661e8
)
Port dictionary file sanity checks from the head
author
aland
<aland>
Wed, 29 Mar 2006 19:56:00 +0000
(19:56 +0000)
committer
aland
<aland>
Wed, 29 Mar 2006 19:56:00 +0000
(19:56 +0000)
src/lib/dict.c
patch
|
blob
|
history
diff --git
a/src/lib/dict.c
b/src/lib/dict.c
index
30d2b7d
..
4d4024e
100644
(file)
--- a/
src/lib/dict.c
+++ b/
src/lib/dict.c
@@
-882,6
+882,12
@@
static int my_dict_init(const char *dir, const char *fn,
}
stat(fn, &statbuf); /* fopen() guarantees this will succeed */
+ if (!S_ISREG(statbuf.st_mode)) {
+ fclose(fp);
+ librad_log("dict_init: Dictionary \"%s\" is not a regular file",
+ fn);
+ return -1;
+ }
dict_stat_add(fn, &statbuf);
/*