aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xstatify5
1 files changed, 3 insertions, 2 deletions
diff --git a/statify b/statify
index 752c78d..b7c9396 100755
--- a/statify
+++ b/statify
@@ -108,14 +108,15 @@ for my $election_name (keys %open_elections) {
.sprintf("Pending Turnout: %02.3f%%\n", ($count_submit+$count_pending)*100.0/$count_voters);
print "$results_buffer\n";
- umask 057;
+ umask 077;
for my $officialname (@officials) {
my $fn = catfile('/home', $officialname, 'voter-turnout-'.$election_name);
open(F, '>', $fn) or
die("failed to open voter turnout file ($fn): $!");
print F $results_buffer;
close F;
- chown ((getpwnam($officialname))[2]), 0, ($fn) or
+ my $uid = (getpwnam($officialname))[2];
+ chown($uid, -1, $fn) or
die("failed to chown voter turnout file ($fn): $!");
}
}