diff options
author | 2022-06-25 09:29:10 -0700 | |
---|---|---|
committer | 2022-06-25 09:31:03 -0700 | |
commit | fe4e279fb5adbb90e780dc13d1c7db9e94737d20 (patch) | |
tree | 5886e6180d64ed0a9d3a7047e8ee06a7118f6506 | |
parent | Add the missing "second" to the closing time for voting. (diff) | |
download | elections-fe4e279fb5adbb90e780dc13d1c7db9e94737d20.tar.gz elections-fe4e279fb5adbb90e780dc13d1c7db9e94737d20.tar.bz2 elections-fe4e279fb5adbb90e780dc13d1c7db9e94737d20.zip |
statify: fix chown
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-x | statify | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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): $!"); } } |