diff options
author | Dmitry Bogatov <KAction@debian.org> | 2019-03-20 12:34:16 +0000 |
---|---|---|
committer | Dmitry Bogatov <KAction@debian.org> | 2019-03-20 12:34:16 +0000 |
commit | ce920b176349198414396a23698345c41e2565ef (patch) | |
tree | 29f6ba3fb7386aabd5a1c2d9f086e2644704bdaa | |
parent | 59d50388e3be8229bfb3388d9cfcfe50aebb6b58 (diff) |
Make permissions of supervise directories 0700, as created by sv(8). (Closes: #924903)
-rw-r--r-- | debian/changelog | 7 | ||||
-rwxr-xr-x | dh_runit | 2 | ||||
-rw-r--r-- | t/924903.t | 5 |
3 files changed, 14 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 20f1fa1..39a5ce8 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -1,3 +1,10 @@ | |||
1 | dh-runit (2.8.10) UNRELEASED; urgency=medium | ||
2 | |||
3 | * Make permissions of supervise directories 0700, as created by sv(8). | ||
4 | (Closes: #924903) | ||
5 | |||
6 | -- Dmitry Bogatov <KAction@debian.org> Wed, 20 Mar 2019 12:33:02 +0000 | ||
7 | |||
1 | dh-runit (2.8.9) experimental; urgency=medium | 8 | dh-runit (2.8.9) experimental; urgency=medium |
2 | 9 | ||
3 | * Fix missing directory error when installing runscript directory. | 10 | * Fix missing directory error when installing runscript directory. |
@@ -71,6 +71,7 @@ PKG: foreach my $pkg (@{$dh{DOPACKAGES}}) { | |||
71 | make_symlink("/etc/sv/$name/supervise", | 71 | make_symlink("/etc/sv/$name/supervise", |
72 | "/var/lib/runit/supervise/$name", $tmp); | 72 | "/var/lib/runit/supervise/$name", $tmp); |
73 | install_dir("$tmp/var/lib/runit/supervise/$name"); | 73 | install_dir("$tmp/var/lib/runit/supervise/$name"); |
74 | chmod 0700, "$tmp/var/lib/runit/supervise/$name"; | ||
74 | install_dir("$tmp/etc/runit/runsvdir/default"); | 75 | install_dir("$tmp/etc/runit/runsvdir/default"); |
75 | 76 | ||
76 | my $substitutions = { | 77 | my $substitutions = { |
@@ -102,6 +103,7 @@ HERE | |||
102 | make_symlink("/etc/sv/$name/log/supervise", | 103 | make_symlink("/etc/sv/$name/log/supervise", |
103 | "/var/lib/runit/log/supervise/$name", $tmp); | 104 | "/var/lib/runit/log/supervise/$name", $tmp); |
104 | install_dir("$tmp/var/lib/runit/log/supervise/$name"); | 105 | install_dir("$tmp/var/lib/runit/log/supervise/$name"); |
106 | chmod 0700, "$tmp/var/lib/runit/log/supervise/$name"; | ||
105 | } | 107 | } |
106 | } | 108 | } |
107 | # runit=2.1.2-20 introduced 'runit-log' user | 109 | # runit=2.1.2-20 introduced 'runit-log' user |
@@ -5,6 +5,11 @@ use Test::More tests => 3; | |||
5 | use File::Path qw(remove_tree); | 5 | use File::Path qw(remove_tree); |
6 | use File::Copy::Recursive qw(dircopy); | 6 | use File::Copy::Recursive qw(dircopy); |
7 | use File::stat; | 7 | use File::stat; |
8 | use Cwd; | ||
9 | |||
10 | my $root = Cwd::cwd; | ||
11 | $ENV{PATH} = "$root:$ENV{PATH}"; | ||
12 | $ENV{DH_AUTOSCRIPTDIR} = $root; | ||
8 | 13 | ||
9 | sub prepare_source_package { | 14 | sub prepare_source_package { |
10 | die '$0 does not match expected format' | 15 | die '$0 does not match expected format' |