diff options
author | Frank Lichtenheld <frank@lichtenheld.de> | 2007-05-27 14:33:10 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-05-29 00:27:21 -0700 |
commit | 24a97d84adb649ca5d90c9b1e6d894f4acee1a6b (patch) | |
tree | c608b9a730abde24d9e203a1f95e37b2a427225d /git-cvsserver.perl | |
parent | b3c81cff02e56a62bd657148da757fdfd8dc6255 (diff) | |
download | git-24a97d84adb649ca5d90c9b1e6d894f4acee1a6b.tar.gz |
cvsserver: Handle 'cvs login'
Since this is a trivial variation of the general pserver
authentication, there is really no reason not to support
it.
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-cvsserver.perl')
-rwxr-xr-x | git-cvsserver.perl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 1de517791f..2b4825a8ee 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -95,9 +95,10 @@ $state->{method} = 'ext'; if (@ARGV && $ARGV[0] eq 'pserver') { $state->{method} = 'pserver'; my $line = <STDIN>; chomp $line; - unless( $line eq 'BEGIN AUTH REQUEST') { + unless( $line =~ /^BEGIN (AUTH|VERIFICATION) REQUEST$/) { die "E Do not understand $line - expecting BEGIN AUTH REQUEST\n"; } + my $request = $1; $line = <STDIN>; chomp $line; req_Root('root', $line) # reuse Root or die "E Invalid root $line \n"; @@ -109,10 +110,11 @@ if (@ARGV && $ARGV[0] eq 'pserver') { } $line = <STDIN>; chomp $line; # validate the password? $line = <STDIN>; chomp $line; - unless ($line eq 'END AUTH REQUEST') { - die "E Do not understand $line -- expecting END AUTH REQUEST\n"; + unless ($line eq "END $request REQUEST") { + die "E Do not understand $line -- expecting END $request REQUEST\n"; } print "I LOVE YOU\n"; + exit if $request eq 'VERIFICATION'; # cvs login # and now back to our regular programme... } |