maybe chmod 0755 'NetworkManager/dispatcher.d'
maybe chmod 0755 'NetworkManager/dispatcher.d/01-ifupdown'
maybe chmod 0755 'NetworkManager/dispatcher.d/no-wait.d'
+maybe chmod 0755 'NetworkManager/dispatcher.d/ntp'
maybe chmod 0755 'NetworkManager/dispatcher.d/pre-down.d'
maybe chmod 0755 'NetworkManager/dispatcher.d/pre-up.d'
maybe chmod 0755 'NetworkManager/dnsmasq-shared.d'
maybe chmod 0644 'apparmor.d/local/usr.sbin.cups-browsed'
maybe chmod 0644 'apparmor.d/local/usr.sbin.cupsd'
maybe chmod 0644 'apparmor.d/local/usr.sbin.ippusbxd'
+maybe chmod 0644 'apparmor.d/local/usr.sbin.ntpd'
maybe chmod 0644 'apparmor.d/local/usr.sbin.rsyslogd'
maybe chmod 0644 'apparmor.d/local/usr.sbin.tcpdump'
maybe chmod 0644 'apparmor.d/sbin.dhclient'
maybe chmod 0644 'apparmor.d/tunables/multiarch'
maybe chmod 0755 'apparmor.d/tunables/multiarch.d'
maybe chmod 0644 'apparmor.d/tunables/multiarch.d/site.local'
+maybe chmod 0644 'apparmor.d/tunables/ntpd'
maybe chmod 0644 'apparmor.d/tunables/proc'
maybe chmod 0644 'apparmor.d/tunables/securityfs'
maybe chmod 0644 'apparmor.d/tunables/sys'
maybe chmod 0644 'apparmor.d/usr.sbin.cups-browsed'
maybe chmod 0644 'apparmor.d/usr.sbin.cupsd'
maybe chmod 0644 'apparmor.d/usr.sbin.ippusbxd'
+maybe chmod 0644 'apparmor.d/usr.sbin.ntpd'
maybe chmod 0644 'apparmor.d/usr.sbin.rsyslogd'
maybe chmod 0644 'apparmor.d/usr.sbin.tcpdump'
maybe chmod 0755 'apparmor/init'
maybe chmod 0755 'cron.daily/logrotate'
maybe chmod 0755 'cron.daily/man-db'
maybe chmod 0755 'cron.daily/mlocate'
+maybe chmod 0755 'cron.daily/ntp'
maybe chmod 0755 'cron.daily/passwd'
maybe chmod 0755 'cron.daily/popularity-contest'
maybe chmod 0755 'cron.daily/rsnapshot'
maybe chmod 0644 'default/networkd-dispatcher'
maybe chmod 0644 'default/networking'
maybe chmod 0644 'default/nss'
+maybe chmod 0644 'default/ntp'
maybe chmod 0644 'default/openvpn'
maybe chmod 0644 'default/psad'
maybe chmod 0644 'default/rcS'
maybe chmod 0644 'dhcp/dhclient-enter-hooks.d/resolvconf'
maybe chmod 0755 'dhcp/dhclient-enter-hooks.d/resolved'
maybe chmod 0755 'dhcp/dhclient-exit-hooks.d'
+maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/ntp'
maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes'
maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/timesyncd'
maybe chmod 0755 'dhcp/dhclient-exit-hooks.d/zzz_avahi-autoipd'
maybe chmod 0755 'init.d/mountnfs.sh'
maybe chmod 0755 'init.d/network-manager'
maybe chmod 0755 'init.d/networking'
+maybe chmod 0755 'init.d/ntp'
maybe chmod 0755 'init.d/ondemand'
maybe chmod 0755 'init.d/openvpn'
maybe chmod 0755 'init.d/plymouth'
maybe chmod 0644 'newt/palette.original'
maybe chmod 0644 'newt/palette.ubuntu'
maybe chmod 0644 'nsswitch.conf'
+maybe chmod 0644 'ntp.conf'
maybe chmod 0644 'nvcc.profile'
maybe chmod 0644 'odbc.ini'
maybe chmod 0644 'odbcinst.ini'
maybe chmod 0755 'systemd/system/graphical.target.wants'
maybe chmod 0755 'systemd/system/multi-user.target.wants'
maybe chmod 0755 'systemd/system/network-online.target.wants'
+maybe chmod 0755 'systemd/system/network-pre.target.wants'
maybe chmod 0755 'systemd/system/paths.target.wants'
maybe chmod 0755 'systemd/system/printer.target.wants'
maybe chmod 0755 'systemd/system/rescue.target.wants'
--- /dev/null
+#!/bin/sh
+
+old_ntp_servers="unknown and invalid"
+new_ntp_servers=$DHCP4_NTP_SERVERS
+case "$2" in
+ up|vpn-up) reason=BOUND; ;;
+ down|vpn-down) reason=RELEASE; ;;
+ *) exit 0; ;;
+esac
+
+test -f /etc/dhcp/dhclient-exit-hooks.d/ntp || exit 0
+. /etc/dhcp/dhclient-exit-hooks.d/ntp
--- /dev/null
+# vim:syntax=apparmor
+# ------------------------------------------------------------------
+#
+# Copyright (C) 2002-2005 Novell/SUSE
+# Copyright (C) 2011 Canonical, Ltd.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of version 2 of the GNU General Public
+# License published by the Free Software Foundation.
+#
+# ------------------------------------------------------------------
+
+#Add your ntpd devices here eg. if you have a DCF clock
+# @{NTPD_DEVICE}="/dev/ttyS1"
+@{NTPD_DEVICE}="/dev/null"
--- /dev/null
+# vim:syntax=apparmor
+# Updated for Ubuntu by: Jamie Strandboge <jamie@canonical.com>
+# ------------------------------------------------------------------
+#
+# Copyright (C) 2002-2005 Novell/SUSE
+# Copyright (C) 2009-2012 Canonical Ltd.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of version 2 of the GNU General Public
+# License published by the Free Software Foundation.
+#
+# ------------------------------------------------------------------
+
+#include <tunables/global>
+#include <tunables/ntpd>
+/usr/sbin/ntpd flags=(attach_disconnected) {
+ #include <abstractions/base>
+ #include <abstractions/nameservice>
+ #include <abstractions/user-tmp>
+
+ capability ipc_lock,
+ capability net_bind_service,
+ capability setgid,
+ capability setuid,
+ capability sys_chroot,
+ capability sys_resource,
+ capability sys_time,
+ capability sys_nice,
+
+ # ntp uses AF_INET, AF_INET6 and AF_UNSPEC
+ network dgram,
+ network stream,
+
+ @{PROC}/net/if_inet6 r,
+ @{PROC}/*/net/if_inet6 r,
+ @{NTPD_DEVICE} rw,
+ # pps devices are almost exclusively used with NTP
+ /dev/pps[0-9]* rw,
+
+ /{,s}bin/ r,
+ /usr/{,s}bin/ r,
+ /usr/local/{,s}bin/ r,
+ /usr/sbin/ntpd rmix,
+
+ /etc/ntp.conf r,
+ /etc/ntp.conf.dhcp r,
+ /etc/ntpd.conf r,
+ /etc/ntpd.conf.tmp r,
+ /run/ntp.conf.dhcp r,
+
+ /etc/ntp.keys r,
+ /etc/ntp/** r,
+
+ /etc/ntp.drift rwl,
+ /etc/ntp.drift.TEMP rwl,
+ /etc/ntp/drift* rwl,
+ /var/lib/ntp/*drift rw,
+ /var/lib/ntp/*drift.TEMP rw,
+
+ /var/log/ntp w,
+ /var/log/ntp.log w,
+ /var/log/ntpd w,
+ /var/log/ntpstats/clockstats* rwl,
+ /var/log/ntpstats/loopstats* rwl,
+ /var/log/ntpstats/peerstats* rwl,
+ /var/log/ntpstats/protostats* rwl,
+ /var/log/ntpstats/rawstats* rwl,
+ /var/log/ntpstats/sysstats* rwl,
+
+ /{,var/}run/ntpd.pid w,
+
+ # to be able to check for running ntpdate
+ /run/lock/ntpdate wk,
+
+ # samba4 ntp signing socket
+ /{,var/}run/samba/ntp_signd/socket rw,
+
+ # samba4 winbindd pipe
+ /run/samba/winbindd/pipe rw,
+
+ # For use with clocks that report via shared memory (e.g. gpsd),
+ # you may need to give ntpd access to all of shared memory, though
+ # this can be considered dangerous. See https://launchpad.net/bugs/722815
+ # for details. To enable, add this to local/usr.sbin.ntpd:
+ # capability ipc_owner,
+
+ # Site-specific additions and overrides. See local/README for details.
+ #include <local/usr.sbin.ntpd>
+}
--- /dev/null
+../../../apparmor.d/usr.sbin.ntpd
\ No newline at end of file
--- /dev/null
+#!/bin/sh
+
+# The default Debian ntp.conf enables logging of various statistics to
+# the /var/log/ntpstats directory. The daemon automatically changes
+# to a new datestamped set of files at midnight, so all we need to do
+# is delete old ones, and compress the ones we're keeping so disk
+# usage is controlled.
+
+statsdir=$(cat /etc/ntp.conf | grep -v '^#' | sed -nr 's/^statsdir[[:space:]]+([^[:space:]]+).*$/\1/p')
+
+if [ -n "$statsdir" ] && [ -d "$statsdir" ]; then
+ # only keep a week's depth of these. Delete only files exactly
+ # within the directory and do not descend into subdirectories
+ # to avoid security risks on platforms where find is not using
+ # fts-library.
+ find "$statsdir" -maxdepth 1 -type f -mtime +7 -delete
+
+ # compress whatever is left to save space but make sure to really
+ # do it only in the expected directory.
+ cd "$statsdir" || exit 1
+ ls -d -- *stats.???????? > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ # Note that gzip won't compress the file names that
+ # are hard links to the live/current files, so this
+ # compresses yesterday and previous, leaving the live
+ # log alone. We suppress the warnings gzip issues
+ # about not compressing the linked file.
+ gzip --best --quiet -- *stats.????????
+ return=$?
+ case $return in
+ 2)
+ exit 0 # squash all warnings
+ ;;
+ *)
+ exit $return # but let real errors through
+ ;;
+ esac
+ fi
+fi
--- /dev/null
+NTPD_OPTS='-g'
--- /dev/null
+NTP_CONF=/etc/ntp.conf
+NTP_DHCP_CONF=/run/ntp.conf.dhcp
+
+
+ntp_server_restart() {
+ invoke-rc.d ntp try-restart
+}
+
+
+ntp_servers_setup_remove() {
+ if [ ! -e $NTP_DHCP_CONF ]; then
+ return
+ fi
+ rm -f $NTP_DHCP_CONF
+ ntp_server_restart
+}
+
+
+ntp_servers_setup_add() {
+ networkd_ntp=$(sed -n 's/NTP=//p' /run/systemd/netif/leases/* 2>/dev/null)
+
+ if [ -z "$new_ntp_servers" ] && [ -z "$networkd_ntp" ]; then
+ ntp_servers_setup_remove
+ return
+ fi
+
+ if [ -e $NTP_DHCP_CONF ] && [ "$new_ntp_servers" = "$old_ntp_servers" ] && [ -z "$networkd_ntp" ] ; then
+ return
+ fi
+
+ tmp=$(mktemp "$NTP_DHCP_CONF.XXXXXX") || return
+ chmod --reference=$NTP_CONF $tmp
+ chown --reference=$NTP_CONF $tmp
+
+ (
+ echo "# This file was copied from $NTP_CONF with the server options changed"
+ echo "# to reflect the information sent by the DHCP server. Any changes made"
+ echo "# here will be lost at the next DHCP event. Edit $NTP_CONF instead."
+ echo
+ echo "# NTP server entries received from DHCP server"
+ for server in $new_ntp_servers $networkd_ntp; do
+ echo "server $server iburst"
+ done
+ echo
+ sed '/^[[:space:]]*\(server\|peer\|pool\)[[:space:]]/d' $NTP_CONF
+ ) >>$tmp
+
+ mv $tmp $NTP_DHCP_CONF
+
+ ntp_server_restart
+}
+
+
+ntp_servers_setup() {
+ case $reason in
+ BOUND|RENEW|REBIND|REBOOT)
+ ntp_servers_setup_add
+ ;;
+ EXPIRE|FAIL|RELEASE|STOP)
+ ntp_servers_setup_remove
+ ;;
+ esac
+}
+
+
+ntp_servers_setup
u2fkey:x:1012:mhoellein
susi:x:1013:
bitcoin:x:138:
+ntp:x:105:
systemd-timesync:x:102:
systemd-network:x:103:
systemd-resolve:x:104:
-systemd-bus-proxy:x:105:
input:x:106:
crontab:x:107:
syslog:x:108:
u2fkey:!::mhoellein
susi:!::
bitcoin:!::
+ntp:!::
systemd-timesync:!::
systemd-network:!::
systemd-resolve:!::
-systemd-bus-proxy:!::
input:!::
crontab:!::
syslog:!::
--- /dev/null
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides: ntp
+# Required-Start: $network $remote_fs $syslog
+# Required-Stop: $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop:
+# Short-Description: Start NTP daemon
+### END INIT INFO
+
+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 /run/ntp.conf.dhcp ]; then
+ NTPD_OPTS="$NTPD_OPTS -c /run/ntp.conf.dhcp"
+fi
+
+
+LOCKFILE=/run/lock/ntpdate
+
+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
+ (
+ flock -w 180 9
+ start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- -p $PIDFILE $NTPD_OPTS
+ ) 9>$LOCKFILE
+ log_end_msg $?
+ ;;
+ stop)
+ log_daemon_msg "Stopping NTP server" "ntpd"
+ start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --retry=TERM/30/KILL/5 --exec $DAEMON
+ 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
--- /dev/null
+# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
+
+driftfile /var/lib/ntp/ntp.drift
+
+# Leap seconds definition provided by tzdata
+leapfile /usr/share/zoneinfo/leap-seconds.list
+
+# Enable this if you want statistics to be logged.
+#statsdir /var/log/ntpstats/
+
+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
+
+# Specify one or more NTP servers.
+
+# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
+# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
+# more information.
+pool 0.ubuntu.pool.ntp.org iburst
+pool 1.ubuntu.pool.ntp.org iburst
+pool 2.ubuntu.pool.ntp.org iburst
+pool 3.ubuntu.pool.ntp.org iburst
+
+# Use Ubuntu's ntp server as a fallback.
+pool ntp.ubuntu.com
+
+# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
+# details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
+# might also be helpful.
+#
+# Note that "restrict" applies to both servers and clients, so a configuration
+# that might be intended to block requests from certain clients could also end
+# up blocking replies from your own upstream servers.
+
+# By default, exchange time with everybody, but don't allow configuration.
+restrict -4 default kod notrap nomodify nopeer noquery limited
+restrict -6 default kod notrap nomodify nopeer noquery limited
+
+# Local users may interrogate the ntp server more closely.
+restrict 127.0.0.1
+restrict ::1
+
+# Needed for adding pool entries
+restrict source notrap nomodify noquery
+
+# Clients from this (example!) subnet have unlimited access, but only if
+# cryptographically authenticated.
+#restrict 192.168.123.0 mask 255.255.255.0 notrust
+
+
+# If you want to provide time to your local subnet, change the next line.
+# (Again, the address is an example only.)
+#broadcast 192.168.123.255
+
+# If you want to listen to time broadcasts on your local subnet, de-comment the
+# next lines. Please do this only if you trust everybody on the network!
+#disable auth
+#broadcastclient
+
+#Changes recquired to use pps synchonisation as explained in documentation:
+#http://www.ntp.org/ntpfaq/NTP-s-config-adv.htm#AEN3918
+
+#server 127.127.8.1 mode 135 prefer # Meinberg GPS167 with PPS
+#fudge 127.127.8.1 time1 0.0042 # relative to PPS for my hardware
+
+#server 127.127.22.1 # ATOM(PPS)
+#fudge 127.127.22.1 flag3 1 # enable PPS API
susi:x:1012:1013:Susanne Weber:/home/susi:
bitcoin:x:128:138::/var/lib/bitcoin:/bin/false
cups-pk-helper:x:129:113:user for cups-pk-helper service,,,:/home/cups-pk-helper:/usr/sbin/nologin
+ntp:x:103:105::/nonexistent:/usr/sbin/nologin
systemd-timesync:x:100:102:systemd Time Synchronization,,,:/run/systemd:/bin/false
systemd-network:x:101:103:systemd Network Management,,,:/run/systemd/netif:/bin/false
systemd-resolve:x:102:104:systemd Resolver,,,:/run/systemd/resolve:/bin/false
-systemd-bus-proxy:x:103:105:systemd Bus Proxy,,,:/run/systemd:/bin/false
syslog:x:104:108::/home/syslog:/bin/false
_apt:x:105:65534::/nonexistent:/bin/false
messagebus:x:106:110::/var/run/dbus:/bin/false
susi:x:1012:1013:Susanne Weber:/home/susi:
bitcoin:x:128:138::/var/lib/bitcoin:/bin/false
cups-pk-helper:x:129:113:user for cups-pk-helper service,,,:/home/cups-pk-helper:/usr/sbin/nologin
+ntp:x:103:105::/nonexistent:/usr/sbin/nologin
--- /dev/null
+../init.d/ntp
\ No newline at end of file
--- /dev/null
+../init.d/ntp
\ No newline at end of file
--- /dev/null
+../init.d/ntp
\ No newline at end of file
--- /dev/null
+../init.d/ntp
\ No newline at end of file
susi:$6$Fcb59jpZ$88N57qIZj1cwxBeklmMoGkFkCmnSpNxC.eWkAVzDAtmgdCiEDdWDXz4XvOdl.VThcynXtWeonUNCKUvLfku2J0:17751:0:99999:7:::
bitcoin:*:17765:0:99999:7:::
cups-pk-helper:*:17767:0:99999:7:::
+ntp:*:17771:0:99999:7:::
systemd-timesync:*:17212:0:99999:7:::
systemd-network:*:17212:0:99999:7:::
systemd-resolve:*:17212:0:99999:7:::
-systemd-bus-proxy:*:17212:0:99999:7:::
syslog:*:17212:0:99999:7:::
_apt:*:17212:0:99999:7:::
messagebus:*:17212:0:99999:7:::
susi:$6$Fcb59jpZ$88N57qIZj1cwxBeklmMoGkFkCmnSpNxC.eWkAVzDAtmgdCiEDdWDXz4XvOdl.VThcynXtWeonUNCKUvLfku2J0:17751:0:99999:7:::
bitcoin:*:17765:0:99999:7:::
cups-pk-helper:*:17767:0:99999:7:::
+ntp:*:17771:0:99999:7:::
--- /dev/null
+/lib/systemd/system/ntp.service
\ No newline at end of file
--- /dev/null
+/lib/systemd/system/ntp-systemd-netif.path
\ No newline at end of file