CVSROOT:        /cvs
Module name:    src
Changes by:     dera...@cvs.openbsd.org 2018/08/31 12:45:02

Modified files:
        usr.sbin/ntpd  : ntpd.c 

Log message:
the main process must chdir to /, since it cannot have daemon() do the
job at startup.  After much anguish I accept dlg's solution of chdir
for the problem ("starting ntpd on a filesystem I want to unmount"),
but we cannot change the main-process daemon() call.  Why?  Because
the ntpd privsep design predates more modern designs where the config
file is parsed once, and configuration marshalled to the fork+exec
children.  Instead each ntpd process re-parses the config, and if
we chdir before fork+exec startup, it will move the basedir causing
-f "relativepath" to fail.

discussed with florian

Reply via email to