summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-cvsserver.perl23
1 files changed, 13 insertions, 10 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 8b97fb8..ed1d5b9 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -194,16 +194,19 @@ if ($state->{method} eq 'pserver') {
print "I HATE YOU\n";
exit 1;
}
- my $auth_ok;
- open PASSWD, "<$cfg->{gitcvs}->{authdb}" or die $!;
- while(<PASSWD>) {
- if (m{^\Q$user\E:(.*)}) {
- if (crypt($user, $1) eq $1) {
- $auth_ok = 1;
- }
- };
- }
- unless ($auth_ok) {
+
+ my $auth_ok;
+ open my $passwd, "<", $cfg->{gitcvs}->{authdb} or die $!;
+ while (<$passwd>) {
+ if (m{^\Q$user\E:(.*)}) {
+ if (crypt($user, $1) eq $1) {
+ $auth_ok = 1;
+ }
+ };
+ }
+ close $passwd;
+
+ unless ($auth_ok) {
print "I HATE YOU\n";
exit 1;
}