]> git.pld-linux.org Git - packages/chrony.git/commitdiff
- rel 4; socket based authentication is gone for some time; enable optional (-d)... auto/th/chrony-3.5-4
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 27 Apr 2020 13:41:21 +0000 (15:41 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 27 Apr 2020 13:41:21 +0000 (15:41 +0200)
chrony.conf
chrony.spec
chronyd.init

index 058de00e25c7e409f215be42cf3adc0a1893f95c..f9f3c6e7c776bed85e37ab3187f82dc9c28e22a1 100644 (file)
@@ -19,9 +19,6 @@ makestep 1.0 3
 # Enable kernel synchronization of the real-time clock (RTC).
 rtcsync
 
-# Specify the key used as password for chronyc.
-commandkey 1
-
 # Send a message to syslog when chronyd has to correct
 # an error larger than 0.5 seconds.
 logchange 0.5
index 36b6ce2b9a4034479a7c1cdfdc3f70173794e645..18f6cdb1ea1d8b1c596a7299c1555d0b36243f65 100644 (file)
@@ -3,7 +3,7 @@
 Summary:       An NTP client/server
 Name:          chrony
 Version:       3.5
-Release:       3
+Release:       4
 License:       GPL v2
 Group:         Daemons
 Source0:       http://download.tuxfamily.org/chrony/%{name}-%{version}.tar.gz
@@ -62,6 +62,7 @@ CC="%{__cc}" \
 CFLAGS="%{rpmcflags} -Wmissing-prototypes -Wall" \
 CPPFLAGS="%{rpmcppflags}" \
 ./configure \
+       --enable-debug \
        --enable-ntp-signd \
        --enable-scfilter \
        --prefix=%{_prefix} \
index 0385b24dc2d6a035d5a8c5d906ddbc761d946be5..e4ff6e5ec0e2c69825097c1e9e12f7b0b1d82f75 100755 (executable)
@@ -33,23 +33,9 @@ config=/etc/ntp/chrony.conf
 keyfile=/etc/ntp/keys
 chronyc=/usr/bin/chronyc
 
-get_key() {
-    awk '/^[ \t]*'$1'[ \t]*/ { print $2; exit }' < $keyfile
-}
-
-get_commandkeyid() {
-    awk '/^[ \t]*commandkey[ \t]*/ { keyid=$2 } END { print keyid }' < $config
-}
-
 chrony_command() {
-    commandkeyid=$(get_commandkeyid)
-    [ -z "$commandkeyid" ] && return 1
-    commandkey=$(get_key $commandkeyid)
-    [ -z "$commandkey" ] && return 2
-
     ! (
         $chronyc <<EOF &
-password $commandkey
 $1
 EOF
         chronycpid=$!
@@ -64,17 +50,6 @@ EOF
     ) | grep -v '200 OK'
 }
 
-generate_commandkey() {
-    commandkeyid=$(get_commandkeyid)
-    [ -z "$commandkeyid" ] && return 1
-    commandkey=$(get_key $commandkeyid)
-    [ -z "$commandkey" ] || return 0
-
-       show "Generating Chrony command key"; busy
-    commandkey=$(tr -c -d '[\041-\176]' < /dev/urandom | head -c 8)
-    [ -n "$commandkey" ] && echo "$commandkeyid $commandkey" >> $keyfile && ok || fail
-}
-
 start() {
        # Check if the service is already running?
        if [ -f /var/lock/subsys/chronyd ]; then
@@ -82,8 +57,6 @@ start() {
                return
        fi
 
-    generate_commandkey
-
        msg_starting "Chronyd NTPD"
        daemon /usr/sbin/chronyd -u $NTPD_USER $OPTIONS
        RETVAL=$?
This page took 0.20909 seconds and 4 git commands to generate.