From 784ba5a7c019f120a6a818c3ff0aaf6714aeab32 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Mon, 13 Apr 2015 19:14:31 +0000 Subject: Run ntpd as non-root user Building with libcap allows ntpd to drop root privileges it doesn't need, we also don't want to run ntpd as root, so we create an ntp user and an ntp group. Change-Id: Idd8a7916af97c10704290234c1bb1f34a14baf2c --- strata/ntpd.morph | 3 ++- strata/ntpd/ntpd.morph | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 strata/ntpd/ntpd.morph diff --git a/strata/ntpd.morph b/strata/ntpd.morph index 969e3d85..4c5483e5 100644 --- a/strata/ntpd.morph +++ b/strata/ntpd.morph @@ -1,9 +1,10 @@ name: ntpd kind: stratum build-depends: -- morph: strata/core.morph +- morph: strata/foundation.morph chunks: - name: ntpd + morph: strata/ntpd/ntpd.morph repo: upstream:ntp ref: b2ccf8dd31d1457ae9f0ae270054117179220370 unpetrify-ref: ntp-4.2.8p2 diff --git a/strata/ntpd/ntpd.morph b/strata/ntpd/ntpd.morph new file mode 100644 index 00000000..fd561de1 --- /dev/null +++ b/strata/ntpd/ntpd.morph @@ -0,0 +1,10 @@ +name: ntpd +kind: chunk +build-system: autotools +configure-commands: + - ./configure --prefix="$PREFIX" --enable-linuxcaps +system-integration: + ntpd-misc: + 00-add-ntpd-user: + - groupadd -r ntp + - useradd -g ntp -d /home/ntp -s /bin/false -r ntp -- cgit v1.2.1