summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@debian.org>2013-09-12 07:07:06 +0200
committerMichael Stapelberg <michael@stapelberg.de>2013-09-12 07:07:06 +0200
commit6e2b55bf26be1c22cec367c42099c5cee4d58325 (patch)
treebbfeec49e21429077c04ac58a53966b805f0647f
parent831013f35eb6813ef9abaf6ee228330aea84e5ff (diff)
downloadinit-system-helpers-6e2b55bf26be1c22cec367c42099c5cee4d58325.tar.gz
Bugfix: create files with permission 0644
fixes #722524
-rwxr-xr-xscript/deb-systemd-helper2
1 files changed, 2 insertions, 0 deletions
diff --git a/script/deb-systemd-helper b/script/deb-systemd-helper
index a8933cb..62ffc79 100755
--- a/script/deb-systemd-helper
+++ b/script/deb-systemd-helper
@@ -152,6 +152,7 @@ sub record_in_statefile {
DIR => dirname($dsh_state),
SUFFIX => '.tmp',
UNLINK => 0);
+ chmod(0644, $tmpname);
if (-e $dsh_state) {
open(my $infh, '<', $dsh_state) or error("unable to read from $dsh_state");
while (<$infh>) {
@@ -264,6 +265,7 @@ sub update_state {
DIR => dirname($dsh_state),
SUFFIX => '.tmp',
UNLINK => 0);
+ chmod(0644, $tmpname);
for my $link (@links) {
print $outfh $link->{src} . "\n";
}