Subject: [alpine-aports] [PATCH] main/openntpd: fixes privelege seperation defaults

From: systmkor <[email-masked]>
Date: Wed, 26 Aug 2015 16:03:44 -0700

- compiles default privelege seperation user as ntp instead of _ntp
 - creates required chroot directory /var/empty in .pre-install script
---
 main/openntpd/APKBUILD             | 3 ++-
 main/openntpd/openntpd.pre-install | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/main/openntpd/APKBUILD b/main/openntpd/APKBUILD
index d2de528..fd68e84 100644
--- a/main/openntpd/APKBUILD
+++ b/main/openntpd/APKBUILD
@@ -2,7 +2,7 @@
 pkgname=openntpd
 pkgver=5.7_p4
 _myver=${pkgver/_/}
-pkgrel=0
+pkgrel=1
 pkgdesc="Lightweight NTP server ported from OpenBSD"
 url=http://www.openntpd.org/
 install="$pkgname.pre-install $pkgname.pre-upgrade $pkgname.post-upgrade"
@@ -41,6 +41,7 @@ build() {
 		--localstatedir=/var \
 		--mandir=/usr/share/man \
 		--sysconfdir=/etc \
+		--with-privsep-user=ntp \
 		|| return 1
 	make || return 1
 }
diff --git a/main/openntpd/openntpd.pre-install b/main/openntpd/openntpd.pre-install
index 0b2be06..36778a9 100644
--- a/main/openntpd/openntpd.pre-install
+++ b/main/openntpd/openntpd.pre-install
@@ -2,6 +2,7 @@
 
 # this user should be included in alpine-baselayout-1.2.
 # included here for backward compability.
+mkdir -p /var/empty
 adduser -H -h /var/empty -s /sbin/nologin -D ntp  2>/dev/null
 
 exit 0
-- 
2.4.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---