[ntp:bugs] [Bug 811] ntpd should not read a .ntprc file

Bruce Korb via the NTP Bugzilla bugzilla at ntp.isc.org
Sat Apr 14 13:13:23 PDT 2007


http://bugs.ntp.isc.org/811



----------------------------------------------------------------------------
Additional Comments From bkorb at gnu.org (Bruce Korb)
Submitted on 2007-04-14 20:13

This should solve your problem:

int
main(int argc, char** argv)
{
   putenv("NTPD=--no-load-opts");
   optionProcess(...);

What will happen is that this environment variable will suppress all
loading of .rc files.  If you did want a system supported config file,
then you could extend it thus:

   putenv("NTPD=--no-load-opts --load-opts=" CONFIGURED_CONFIG_FILE);

If you want to suppress environment variable loading also,
you'd need to strip them out.  Without ``envrionrc'' set, this
mechanism won't work and I'd need to think some more.

-- 
Bruce Korb <bkorb at gnu.org>



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


More information about the bugs mailing list