Hello,
this patch makes ospfd(8) and ospf6d(8) check its config file permissions
even if run with a -n to test it. bgpd already behaves this way (changed
6 years ago by henning@) and it's quite handy to fix the permissions while
doing tests, rather than at the first production boot time :-)
Any comments?
--
Martin Pelikan
Index: parse.y
===================================================================
RCS file: /cvs/src/usr.sbin/ospf6d/parse.y,v
retrieving revision 1.20
diff -u -p -r1.20 parse.y
--- parse.y 13 Dec 2010 13:43:37 -0000 1.20
+++ parse.y 12 Jan 2011 22:23:36 -0000
@@ -887,7 +887,7 @@ parse_config(char *filename, int opts)
conf->spf_hold_time = DEFAULT_SPF_HOLDTIME;
conf->spf_state = SPF_IDLE;
- if ((file = pushfile(filename, !(conf->opts & OSPFD_OPT_NOACTION))) ==
NULL) {
+ if ((file = pushfile(filename, 1)) == NULL) {
free(conf);
return (NULL);
}
Index: parse.y
===================================================================
RCS file: /cvs/src/usr.sbin/ospfd/parse.y,v
retrieving revision 1.73
diff -u -p -r1.73 parse.y
--- parse.y 13 Dec 2010 13:43:37 -0000 1.73
+++ parse.y 12 Jan 2011 22:23:51 -0000
@@ -1092,7 +1092,7 @@ parse_config(char *filename, int opts)
conf->spf_hold_time = DEFAULT_SPF_HOLDTIME;
conf->spf_state = SPF_IDLE;
- if ((file = pushfile(filename, !(conf->opts & OSPFD_OPT_NOACTION))) ==
NULL) {
+ if ((file = pushfile(filename, 1)) == NULL) {
free(conf);
return (NULL);
}