From ce920b176349198414396a23698345c41e2565ef Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Wed, 20 Mar 2019 12:34:16 +0000 Subject: Make permissions of supervise directories 0700, as created by sv(8). (Closes: #924903) --- debian/changelog | 7 +++++++ dh_runit | 2 ++ t/924903.t | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/debian/changelog b/debian/changelog index 20f1fa1..39a5ce8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +dh-runit (2.8.10) UNRELEASED; urgency=medium + + * Make permissions of supervise directories 0700, as created by sv(8). + (Closes: #924903) + + -- Dmitry Bogatov Wed, 20 Mar 2019 12:33:02 +0000 + dh-runit (2.8.9) experimental; urgency=medium * Fix missing directory error when installing runscript directory. diff --git a/dh_runit b/dh_runit index 15a6d17..5ed55b5 100755 --- a/dh_runit +++ b/dh_runit @@ -71,6 +71,7 @@ PKG: foreach my $pkg (@{$dh{DOPACKAGES}}) { make_symlink("/etc/sv/$name/supervise", "/var/lib/runit/supervise/$name", $tmp); install_dir("$tmp/var/lib/runit/supervise/$name"); + chmod 0700, "$tmp/var/lib/runit/supervise/$name"; install_dir("$tmp/etc/runit/runsvdir/default"); my $substitutions = { @@ -102,6 +103,7 @@ HERE make_symlink("/etc/sv/$name/log/supervise", "/var/lib/runit/log/supervise/$name", $tmp); install_dir("$tmp/var/lib/runit/log/supervise/$name"); + chmod 0700, "$tmp/var/lib/runit/log/supervise/$name"; } } # runit=2.1.2-20 introduced 'runit-log' user diff --git a/t/924903.t b/t/924903.t index 92ca4b0..fa70834 100644 --- a/t/924903.t +++ b/t/924903.t @@ -5,6 +5,11 @@ use Test::More tests => 3; use File::Path qw(remove_tree); use File::Copy::Recursive qw(dircopy); use File::stat; +use Cwd; + +my $root = Cwd::cwd; +$ENV{PATH} = "$root:$ENV{PATH}"; +$ENV{DH_AUTOSCRIPTDIR} = $root; sub prepare_source_package { die '$0 does not match expected format' -- cgit v1.2.3