#
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_NAME:=openntpd
PKG_VERSION:=3.9p1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/ \
#!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
START=60
}
start() {
- mkdir -p `awk -F: '/^ntp:/{print $6}' /etc/passwd`
+ mkdir -p `awk -F: '/^network:/{print $6}' /etc/passwd`
mkdir -p /var/db/
/usr/sbin/ntpd -s
}
stop() {
- # -1 seems insufficient to kill one of the two underlying processes.
- killall -9 ntpd
+ service_kill ntpd
}
--- /dev/null
+--- a/ntp.c
++++ b/ntp.c
+@@ -111,8 +111,6 @@ ntp_main(int pipe_prnt[2], struct ntpd_c
+
+ if (stat(chrootdir, &stb) == -1)
+ fatal("stat");
+- if (stb.st_uid != 0 || (stb.st_mode & (S_IWGRP|S_IWOTH)) != 0)
+- fatal("bad privsep dir permissions");
+ if (chroot(chrootdir) == -1)
+ fatal("chroot");
+ if (chdir("/") == -1)