This area is a mess.

The basic problem is that we are setup to specify the log file in 
ntp.config and that isn't setup until after the config file is parsed so 
all the errors during parsing go to the system log file and I don't 
remember to look there, especially if things seem to be working.

I see two solutions:

The first is to switch to setting up the log file on the command line.  I 
tried editing  /usr/lib/systemd/system/ntpd.service, but the next install 
undid that.  I think we need to add a config option to setup the command 
line in the ntpd.service that we install.

(I have hacked my build script to do what I need on systems that use 
systemd.  I haven't explored other systems yet.)


The second approach would be to save copies of all the logging before the 
log file is setup and play them again when the log file is setup from the 
config file.

------

There is code in there to count parsing errors.  it misses many of them.  
I think it goes like this...

There are two types of parsing errors.  One is that the text doesn't 
follow the basic legal structure, typically finding something strange when 
it is expecting a keyword.  The other is that values aren't legal.  Some 
of those get checked in the parser.  Those call yyerror and don't get 
counted.  That would be easy to fix.  Others are checked in ntp_config.  
They don't get counted either.  That would be possible to fix but hard to 
keep fixed.

Tangled up in this area is security.  If you meant "nts" but typoed "ntss" 
that's a security error and we might want to bail rather than ignore it an 
plunge on in a lower security mode.


-- 
These are my opinions.  I hate spam.



_______________________________________________
devel mailing list
[email protected]
https://lists.ntpsec.org/mailman/listinfo/devel

Reply via email to