Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 108537 - openntpd ebuild should check ntp user home directory
Summary: openntpd ebuild should check ntp user home directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
: 145175 155100 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-08 14:10 UTC by Gokdeniz Karadag
Modified: 2010-10-17 23:44 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gokdeniz Karadag 2005-10-08 14:10:53 UTC
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
Comment 1 Gokdeniz Karadag 2005-10-08 14:30:02 UTC
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. 
Comment 2 SpanKY gentoo-dev 2005-10-08 15:41:45 UTC
the init.d script already cchecks this
Comment 3 Gokdeniz Karadag 2005-11-03 13:25:19 UTC
(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"
Comment 4 SpanKY gentoo-dev 2005-12-23 21:29:05 UTC
that message is in the init.d script
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-08-26 06:24:17 UTC
*** Bug 145175 has been marked as a duplicate of this bug. ***
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2006-11-14 00:35:59 UTC
*** Bug 155100 has been marked as a duplicate of this bug. ***