On Wed, Jan 12, 2011 at 11:57:59PM +0100, Martin Pelikan wrote: > 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?
Appart from my desire to kill the permission checking? I don't see why bgpd and ospfd needs this non-unix like behaviour, other tools like pfctl do not care. We install the file with the correct permissions so if somebody changes them it is his fault. But this is just my opinion. > -- > 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); > } > -- :wq Claudio