[debsums] 101/184: only ignore permissions errors if running as non-root
Axel Beckert
abe at deuxchevaux.org
Mon Mar 2 21:21:23 UTC 2015
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to branch master
in repository debsums.
commit 6c03f9681eb1c0910e57e6dd7c016b4205c59d38
Author: Ryan Niebur <ryanryan52 at gmail.com>
Date: Sun Aug 2 17:22:31 2009 -0700
only ignore permissions errors if running as non-root
---
debsums.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/debsums.in b/debsums.in
index 1385322..06d730c 100755
--- a/debsums.in
+++ b/debsums.in
@@ -16,6 +16,7 @@ use Getopt::Long qw/:config bundling/;
use Digest::MD5;
use constant ELF_MAGIC => "\177ELF";
use Errno;
+use POSIX;
(my $self = $0) =~ s!.*/!!;
my $version = <<EOT;
@@ -76,7 +77,7 @@ GetOptions (
) or die "Try '$self --help' for more information.\n";
sub can_ignore {
- return $!{EACCES} && $ignore_permissions;
+ return $!{EACCES} && $ignore_permissions && getuid();
}
sub warn_or_die {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/debsums.git
More information about the Pkg-perl-cvs-commits
mailing list