[pkg-ntp-maintainers] Bug#787404: ntp_intres.request: permission denied

Klaus Ethgen Klaus at Ethgen.de
Mon Jun 1 08:16:05 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Package: ntp
Version: 1:4.2.6.p5+dfsg-7
Severity: normal

This is a successor of bug #571469. All is said there. NTP needs running
DNS when it starts. Please add $named to Required-Start in init script.

Funny thing, reportbug does include my changed init.d script below but
not the changed part:
   # Required-Start:  $network $remote_fs $syslog $named

In my setup, ntp and dns was start at the same runlevel. But as
"unbounce" comes lexically after "ntp", ntp was start first. With bind,
that could work as "bind" is lexically earlier in the list. However,
There is a dependency between ntp and dns so that dependency has to be
configured correctly.

- -- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (800, 'unstable'), (500, 'testing'), (110, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.19.5 (SMP w/8 CPU cores)
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1) (ignored: LC_ALL set to de_DE)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages ntp depends on:
ii  adduser      3.113+nmu3
ii  dpkg         1.18.1
ii  libc6        2.19-18
ii  libcap2      1:2.24-8
ii  libedit2     3.1-20150325-1
ii  libopts25    1:5.18.5-2
ii  libssl1.0.0  1.0.2a-1
ii  lsb-base     4.1+Debian13+nmu1
ii  netbase      5.3

Versions of packages ntp recommends:
ii  perl  5.20.2-6

Versions of packages ntp suggests:
ii  ntp-doc  1:4.2.6.p5+dfsg-7

- -- Configuration Files:
/etc/init.d/ntp changed:
PATH=/sbin:/bin:/usr/sbin:/usr/bin
. /lib/lsb/init-functions
DAEMON=/usr/sbin/ntpd
PIDFILE=/var/run/ntpd.pid
test -x $DAEMON || exit 5
if [ -r /etc/default/ntp ]; then
	. /etc/default/ntp
fi
if [ -e /var/lib/ntp/ntp.conf.dhcp ]; then
	NTPD_OPTS="$NTPD_OPTS -c /var/lib/ntp/ntp.conf.dhcp"
fi
LOCKFILE=/var/lock/ntpdate
lock_ntpdate() {
	if [ -x /usr/bin/lockfile-create ]; then
		lockfile-create $LOCKFILE
		lockfile-touch $LOCKFILE &
		LOCKTOUCHPID="$!"
	fi
}
unlock_ntpdate() {
	if [ -x /usr/bin/lockfile-create ] ; then
		kill $LOCKTOUCHPID
		lockfile-remove $LOCKFILE
	fi
}
RUNASUSER=ntp
UGID=$(getent passwd $RUNASUSER | cut -f 3,4 -d:) || true
if test "$(uname -s)" = "Linux"; then
        NTPD_OPTS="$NTPD_OPTS -u $UGID"
fi
case $1 in
	start)
		log_daemon_msg "Starting NTP server" "ntpd"
		if [ -z "$UGID" ]; then
			log_failure_msg "user \"$RUNASUSER\" does not exist"
			exit 1
		fi
		lock_ntpdate
  		start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- -p $PIDFILE $NTPD_OPTS
		status=$?
		unlock_ntpdate
		log_end_msg $status
  		;;
	stop)
		log_daemon_msg "Stopping NTP server" "ntpd"
  		start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
		log_end_msg $?
		rm -f $PIDFILE
  		;;
	restart|force-reload)
		$0 stop && sleep 2 && $0 start
  		;;
	try-restart)
		if $0 status >/dev/null; then
			$0 restart
		else
			exit 0
		fi
		;;
	reload)
		exit 3
		;;
	status)
		status_of_proc $DAEMON "NTP server"
		;;
	*)
		echo "Usage: $0 {start|stop|restart|try-restart|force-reload|status}"
		exit 2
		;;
esac

/etc/ntp.conf changed:
logfile /var/log/ntpd
driftfile /var/lib/ntp/ntp.drift
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
server 0.ch.pool.ntp.org iburst
server 1.ch.pool.ntp.org iburst
server 2.ch.pool.ntp.org iburst
server 3.ch.pool.ntp.org iburst
restrict -4 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1 nomodify
restrict 192.168.17.0 mask 255.255.255.0 nomodify


- -- no debconf information

- -- 
Klaus Ethgen                              http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16   Klaus Ethgen <Klaus at Ethgen.de>
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQGcBAEBCgAGBQJVbBS+AAoJEKZ8CrGAGfasz80MAL+wqpbxY/Rve7VSQGcq0ZES
zeVVJ+smEWyeKO6xnZ5Fxqcr7OyTKfz9kU5+bZUkBgOsjP3ecscTioEN6KGCAUD7
DEoSoC4iOGWpyLNtbWH9fm+8yMKDelYMlyggTD2L/BsMjql/ETnxa+dFp75FZZ3/
SKqrVp1fRqd9gzoeu4oAlEz9DwcKepBXwfabAWpWGgHCqdKX7M2Mo/y3uY4NxCOi
fpIVrb4jcv1qsW3FhBR7waXk7F1MYMfDhZ7tVe+JZYnzMIM/Yeiwd2jO79j6u0x5
WqTKseWv6J4JrtpKMGzJHQIvr2ai5ycSg9gYKf6E2eo3BFs6NUjlRdR2PWHNDnT2
V6r/IEHZC16eCCyAH5ghXAa4SMgPBmt1/Y6XajgPJKGL/0HuszbJZGuZwEEg+GjT
pS0+qIQe4dNura6bIqtht9/uD6PPpoJeoobnR5yf25VDnC/5XMzhGIbL1ia/hrZg
RLU/HpxMJ7CNOVngjDuxe4bq1mFE+07wqNQRvRtbqg==
=GfAm
-----END PGP SIGNATURE-----



More information about the pkg-ntp-maintainers mailing list