summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@omgwallhack.org>2019-10-28 16:32:04 -0700
committerJoe Rayhawk <jrayhawk@omgwallhack.org>2019-10-28 16:32:04 -0700
commit19ee32c91c882fbead9cee20c406bc11e195790b (patch)
tree903ac1bc614da81df40fbcd9997d8df0be724b67
parent6f783f8593a77f083a206df163b1bb4d4dca5769 (diff)
downloadpiny-code-19ee32c91c882fbead9cee20c406bc11e195790b.tar.gz
piny-code-19ee32c91c882fbead9cee20c406bc11e195790b.zip
libpiny: repo: fix various syntax errors
-rw-r--r--libpiny/lib/Piny/Repo.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm
index e48faf1..6e546d5 100644
--- a/libpiny/lib/Piny/Repo.pm
+++ b/libpiny/lib/Piny/Repo.pm
@@ -328,16 +328,16 @@ sub rebuild_git {
# FIXME: most of these are probably unnecessary to check due to limitations of bare repositories.
foreach( "applypatch-msg", "pre-applypatch", "post-applypatch", "pre-commit", "prepare-commit-msg", "commit-msg", "post-commit", "pre-rebase", "post-checkout", "post-merge", "pre-push", "pre-receive", "update", "post-receive", "post-update", "push-to-checkout", "pre-auto-gc", "post-rewrite", "sendemail-validate", "fsmonitor-watchman" ) {
my $link = $s->path . "/hooks/" . $_;
- while ( -s $link; ) {
+ while ( -s $link ) {
$link = readlink( $link );
};
my ( $dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks ) = stat( $link ) or next;
my $name = getpwuid( $uid ) or die "Unable to find name for uid" . $uid . "for hook " . $s->path . "/hooks/" . $_ . "\n";
my $group = getgrgid( $gid ) or die "Unable to find group for gid" . $gid . "for hook " . $s->path . "/hooks/" . $_ . "\n";
- unless ( $name =~ /^(root|iki-$s->shortname)/ ); ) {
+ unless ( $name =~ /^(root|iki-$s->shortname)/ ) {
warn( "Security warning: $link is not owned by user root or iki-$s->shortname!\n" );
};
- unless ( $group =~ /^(root|iki-$s->shortname|git-$s->shortname)$/ ); ) {
+ unless ( $group =~ /^(root|iki-$s->shortname|git-$s->shortname)$/ ) {
warn( "Security warning: $link is not owned by group root, iki-$s->shortname, or git-$s->shortname!\n" );
};
};