Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 558352 - net-misc/openntpd-5.7_p4-r1 wrong NTP_HOME dir ownership
Summary: net-misc/openntpd-5.7_p4-r1 wrong NTP_HOME dir ownership
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Paul B. Henson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-21 14:24 UTC by Vlad K.
Modified: 2015-08-27 03:52 UTC (History)
3 users (show)

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


Attachments
patch ebuild from 5.7_p4-r1 to 5.7_p4-r2 (openntpd-5.7_p4-r2.ebuild.patch,469 bytes, patch)
2015-08-27 03:39 UTC, Paul B. Henson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad K. 2015-08-21 14:24:55 UTC
The openntpd-5.7_p4-r1 ebuild is missing the pkg_config() step that sets root:root ownership on $NTP_HOME  (default /var/lib/openntpd/chroot), the result of which is ntp:root ownership of the $NTP_HOME which prevents it to start with the error "fatal: bad privsep dir /var/lib/openntpd/chroot permissions: 40755".

Upgrading openntpd from openntpd-4.0_pre20080406 to 5.7_p4-r1 does not suffer from this issue because installing 4.0 first sets proper $NTP_HOME ownership (root:root).


Reproducible: Always

Steps to Reproduce:
1. make sure there's no user "ntp" with home dir /var/lib/openntpd/chroot from a previous installation
2. install openntpd-5.7_p4-r1
3. run /etc/init.d/ntpd start 
Actual Results:  
ntpd fails to start, logs error "fatal: bad privsep dir /var/lib/openntpd/chroot permissions: 40755"

Expected Results:  
Service running.
Comment 1 Jakub Jirutka 2015-08-23 18:01:11 UTC
I can confirm this bug. ntpd requires /var/lib/openntpd/chroot to be owned by root.
Comment 2 Paul B. Henson 2015-08-27 03:38:25 UTC
Hmm, yep, when I ripped pkg_config out to get rid of the timezone handling it did indeed lose the chown of the home directory. I know I tested installing earlier versions from scratch but must have forgotten on this one, sorry :(.

It actually belongs in pkg_postinst, not pkg_config, I think. Patch attached to bump to -r2 and fix this issue. Man, I was just about to go back and reopen the stable bug :), guess I'll mark another month off on my calendar.
Comment 3 Paul B. Henson 2015-08-27 03:39:03 UTC
Created attachment 410382 [details, diff]
patch ebuild from 5.7_p4-r1 to 5.7_p4-r2