From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (unknown [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1AFD6158094 for ; Sat, 25 Jun 2022 16:31:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3091FE0951; Sat, 25 Jun 2022 16:31:15 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 152E7E0951 for ; Sat, 25 Jun 2022 16:31:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3FE00341726 for ; Sat, 25 Jun 2022 16:31:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7FE51471 for ; Sat, 25 Jun 2022 16:31:12 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1656174663.fe4e279fb5adbb90e780dc13d1c7db9e94737d20.robbat2@gentoo> Subject: [gentoo-commits] proj/elections:master commit in: / X-VCS-Repository: proj/elections X-VCS-Files: statify X-VCS-Directories: / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: fe4e279fb5adbb90e780dc13d1c7db9e94737d20 X-VCS-Branch: master Date: Sat, 25 Jun 2022 16:31:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e830e534-ca81-40e7-afc2-6189073a664b X-Archives-Hash: 49caad9d854252ff34532064bdfbbf49 commit: fe4e279fb5adbb90e780dc13d1c7db9e94737d20 Author: Robin H. Johnson gentoo org> AuthorDate: Sat Jun 25 16:29:10 2022 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Sat Jun 25 16:31:03 2022 +0000 URL: https://gitweb.gentoo.org/proj/elections.git/commit/?id=fe4e279f statify: fix chown Signed-off-by: Robin H. Johnson gentoo.org> statify | 5 +++-- 1 file 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): $!"); } }