net-misc/ntp creates an ntp user with home directory "/dev/null". It has a use flag to make it work along "openntpd", I enabled it, reemerged ntp and emerged openntpd after. But openntpd refused to start, complaining about "privilege seperation directory" permissions. In the conf file, /var/empty is given as home, and it has the same permissions as a working installation. A quick look at source reveals that openntpd looks at ntp user's home directory instead of variable in the conf file. The openntpd ebuild sets it as /var/empty IF creating a new user, but the user is already there, installed by net-misc/ntp with home directory /dev/null and it is unchanged. Then permissions of dev/null does not satisfy the program. Solutions: The openntpd ebuild should check the home directory of the user and change it if necessary. OR ntp ebuild should change home directory if openntpd useflag is set OR openntpd source should be patched so that it should read NTPD_HOME variable from /etc/conf.d/ntpd [ I believe this last option is the way to go ] Note: I did not test the case where ntp is installed freshly with the openntpd use flag set. Reproducible: Always Steps to Reproduce: 1.Emerge ntp with use flag openntpd 2.Emerge openntpd 3.Try to run openntpd with debugging (ntpd -d) Actual Results: fatal: bad privsep dir permissions dispatch_imsg in main: pipe closed Terminating Expected Results: Start syncing system clock Portage 2.0.51.22-r3 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r1, 2.6.11-gentoo-r4 i686) ================================================================= System uname: 2.6.11-gentoo-r4 i686 Pentium II (Deschutes) Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5-r2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=i686 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=i686 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.ankara.edu.tr/gentoo/ ftp://ftp.ankara.edu.tr/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 alsa bash-completion berkdb bitmap-fonts cdr crypt curl eds emboss encode fortran gdbm gpm gstreamer imagemagick imap libg++ libwww mbox mime mp3 ncurses nls ogg opengl openssh pam pdflib perl posix python readline ruby slang snmp spell ssl tcpd tetex truetype truetype-fonts type1-fonts unicode vorbis xml xml2 zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
UPDATE: Well, after I tried in debug mode and saw that openntpd was working, I stopped debug mode and started init script, it said I needed to change ntp home directory to /var/empty. I think initscript is too late for this check, because a newly installed program has to be tested, and the test fails in this case with current ebuild behaviour. I think that my proposed solutions above should be considered to provide a more robust solution. At least this issue should be documented somewhere.
the init.d script already cchecks this
(In reply to comment #2) > the init.d script already cchecks this One or two lines of info displayed after the install should be informative though. At least, It wouldn't give any harm. An appropriate message may be similar to the initscript's message; "To use openntpd, change the home directory of ntp user usermod -d /var/empty ntp"
that message is in the init.d script
*** Bug 145175 has been marked as a duplicate of this bug. ***
*** Bug 155100 has been marked as a duplicate of this bug. ***