diff options
author | Juergen Daubert <jue@jue.li> | 2016-11-25 17:51:29 +0100 |
---|---|---|
committer | Juergen Daubert <jue@jue.li> | 2016-11-25 17:51:29 +0100 |
commit | 35af3bca43e5207b1f889d3a2e7e8ef6301a54d4 (patch) | |
tree | 84dd5d3cda2d6b23734e5887aefffa13748ef2cd /chrony | |
parent | 80678859ec5f9c3d653a80029a00c4430473da70 (diff) | |
download | opt-35af3bca43e5207b1f889d3a2e7e8ef6301a54d4.tar.gz opt-35af3bca43e5207b1f889d3a2e7e8ef6301a54d4.tar.xz |
chrony: run the daemon as system user chrony
Diffstat (limited to 'chrony')
-rw-r--r-- | chrony/.footprint | 6 | ||||
-rw-r--r-- | chrony/.md5sum | 2 | ||||
-rw-r--r-- | chrony/Pkgfile | 8 | ||||
-rw-r--r-- | chrony/README | 15 | ||||
-rw-r--r-- | chrony/chronyd | 2 | ||||
-rw-r--r-- | chrony/post-install | 4 | ||||
-rw-r--r-- | chrony/pre-install | 6 |
7 files changed, 34 insertions, 9 deletions
diff --git a/chrony/.footprint b/chrony/.footprint index 53004ba9d..b122ba1c0 100644 --- a/chrony/.footprint +++ b/chrony/.footprint @@ -17,8 +17,8 @@ drwxr-xr-x root/root usr/share/man/man8/ -rw-r--r-- root/root usr/share/man/man8/chronyd.8.gz drwxr-xr-x root/root var/ drwxr-xr-x root/root var/lib/ -drwxr-xr-x root/root var/lib/chrony/ +drwxr-x--- chrony/chrony var/lib/chrony/ drwxr-xr-x root/root var/log/ -drwxr-xr-x root/root var/log/chrony/ +drwxr-x--- chrony/chrony var/log/chrony/ drwxr-xr-x root/root var/run/ -drwxr-x--- root/root var/run/chrony/ +drwxr-x--- chrony/chrony var/run/chrony/ diff --git a/chrony/.md5sum b/chrony/.md5sum index babd259ab..718e57d33 100644 --- a/chrony/.md5sum +++ b/chrony/.md5sum @@ -1,2 +1,2 @@ d08dd5a7d79a89891d119adcccb4397d chrony-2.4.1.tar.gz -4bdea4aea28853c7be54ffdb9f6b87a8 chronyd +b34048039655b0eba564f10cca23e3ce chronyd diff --git a/chrony/Pkgfile b/chrony/Pkgfile index 63dbb5271..fbbd1720a 100644 --- a/chrony/Pkgfile +++ b/chrony/Pkgfile @@ -5,19 +5,19 @@ name=chrony version=2.4.1 -release=1 +release=2 source=(http://download.tuxfamily.org/$name/$name-$version.tar.gz chronyd) build () { cd $name-$version - ./configure --prefix=/usr + ./configure --prefix=/usr --with-user=chrony + make make DESTDIR=$PKG install - install -d $PKG/var/{lib,log}/chrony - install -d -m 0750 $PKG/var/run/chrony + install -d -o chrony -g chrony -m 0750 $PKG/var/{lib,log,run}/chrony install -D -m 0755 $SRC/chronyd $PKG/etc/rc.d/chronyd install examples/chrony.conf.example1 $PKG/etc/chrony.conf } diff --git a/chrony/README b/chrony/README new file mode 100644 index 000000000..752308b9e --- /dev/null +++ b/chrony/README @@ -0,0 +1,15 @@ +README for chrony 2.4.x + +REQUIREMENTS + +PRE-INSTALL + Run the included pre-install script to create a new + user/group chrony. + +PRECAUTION + As of version 2.4.1-2 chrony no longer runs as root + but as a dedicated user/group chrony. + Chown all files and directories created by chrony + to chrony:chrony or run the supplied post-install + script. + diff --git a/chrony/chronyd b/chrony/chronyd index b9bcac1e6..e6629e718 100644 --- a/chrony/chronyd +++ b/chrony/chronyd @@ -13,7 +13,7 @@ start) $SSD --start --pidfile $PID --exec $PROG -- $OPTS ;; stop) - $SSD --stop --retry 10 --pidfile $PID + $SSD --stop --remove-pidfile --retry 10 --pidfile $PID ;; restart) $0 stop diff --git a/chrony/post-install b/chrony/post-install new file mode 100644 index 000000000..cd6276af0 --- /dev/null +++ b/chrony/post-install @@ -0,0 +1,4 @@ +#!/bin/sh + +chown -R chrony:chrony /var/lib/chrony /var/log/chrony + diff --git a/chrony/pre-install b/chrony/pre-install new file mode 100644 index 000000000..b8b8f93be --- /dev/null +++ b/chrony/pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +getent group chrony || /usr/sbin/groupadd -g 55 chrony +getent passwd chrony || /usr/sbin/useradd -g chrony -u 55 -d /var/lib/chrony -s /bin/false chrony +/usr/bin/passwd -l chrony + |