Commit bbb82f1f authored by Sami Farin's avatar Sami Farin
Browse files

Exit if config file fails to open

Now ntpd does not report any errors on config file open and proceeds
as normal after file open has failed.
parent b4c55361
Loading
Loading
Loading
Loading
Loading
  • shouldbeq931 @shouldbeq931

    mentioned in issue #649 (closed)

    ·

    mentioned in issue #649 (closed)

    Toggle commit list
  • Maintainer

    What was your motivation for this change?

    Designer's intent was that if ntp.conf is not available, config files in /etc/ntp.d should be scanned.

  • Author Contributor

    If I specify -c parameter and the config file is not found, ntpsec fails silently without errors. However, I didn't know there was .d directory scanning feature in ntpsec. That could be fixed by removing the exit call from my patch and restoring stream = NULL;.

    But looks like it is untested, since if I specify -c /etc/ntpsec.conf , it scans /etc/ntp.d instead of /etc/ntpsec.d . 2. Then the configuration directory, if it exists, is scanned. Normally this directory is /etc/ntp.d, but if the -c option is specified the /etc will be specified by the directory name of the -c argument.

    Edited by Sami Farin
  • Maintainer

    Sami Farin gitlab@mg.gitlab.com:

    Sami Farin commented:

    If I specify -c parameter and the config file is not found, ntpsec fails silently without errors. However, I didn't know there was .d directory scanning feature in ntpsec. That could be fixed by removing the exit call from my patch.

    But looks like it is untested, since if I specify -c /etc/ntpsec.conf , it scans /etc/ntp.d instead of /etc/ntpsec.d . 2. Then the configuration directory, if it exists, is scanned. Normally this directory is /etc/ntp.d, but if the -c option is specified the /etc will be specified by the directory name of the -c argument.

    I'll take an updated patch, if you have time and interest. Otherwise let me know and I'll do it.

  • Author Contributor

    I am a little busy, can you do it? Thanks.

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment