mirror of
https://github.com/git/git.git
synced 2024-05-14 17:26:13 +02:00
git-cvsserver: indent & clean up authdb code
- Indent the last commit to fit with the rest of the code. - Use lexical filehandles instead of global globs - Close the filehandle after the password database has been read. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
c057bad370
commit
3052525eff
|
@ -194,16 +194,19 @@
|
||||||
print "I HATE YOU\n";
|
print "I HATE YOU\n";
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
my $auth_ok;
|
|
||||||
open PASSWD, "<$cfg->{gitcvs}->{authdb}" or die $!;
|
my $auth_ok;
|
||||||
while(<PASSWD>) {
|
open my $passwd, "<", $cfg->{gitcvs}->{authdb} or die $!;
|
||||||
if (m{^\Q$user\E:(.*)}) {
|
while (<$passwd>) {
|
||||||
if (crypt($user, $1) eq $1) {
|
if (m{^\Q$user\E:(.*)}) {
|
||||||
$auth_ok = 1;
|
if (crypt($user, $1) eq $1) {
|
||||||
}
|
$auth_ok = 1;
|
||||||
};
|
}
|
||||||
}
|
};
|
||||||
unless ($auth_ok) {
|
}
|
||||||
|
close $passwd;
|
||||||
|
|
||||||
|
unless ($auth_ok) {
|
||||||
print "I HATE YOU\n";
|
print "I HATE YOU\n";
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue