I've tried using CTRL-J to generate the "\n" newline
character, and it still didn't work. I don't think the
CR/LF would be a problem since I was telnetting from
a unix box to itself. Were you able to connect to CVS
through this method?
-----Original Message-----
From: Peter Vogel [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 29, 2001 4:35 PM
To: '[EMAIL PROTECTED]'
Subject: RE: CVS and Ant build tool
The end of each line that the CVS is looking for is a
LF, not a CR, make sure your telnet understands that,
or use CTRL-J to make a newline and keep your hands off
the enter key :-)
Also, note that the password as transmitted over the line
is trivially encrypted via a rotation scheme, so you'll
have to do the same rotation.
-Peter
--
Peter A. Vogel
Manager, Configuration Management
Arsin Corporation
4800 Great America Parkway Suite 425, Santa Clara, CA 95054
> -----Original Message-----
> From: Cheng, John [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 29, 2001 4:23 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: CVS and Ant build tool
>
>
> I am running a pserver. And I've been able to connect and log
> in using the
> standard CVS tools. I am now trying to login into the pserver
> CVS using Ant.
> Since there is no command in Ant for doing so, I am trying to
> resort to
> logging in via telnet (manually) first, then continue with my project.
>
> I would try doing this:
>
> telnet localhost 2401
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> BEGIN AUTH VERIFICATION
> cvs [pserver aborted]: bad auth protocol start: BEGIN AUTH
> VERIFICATION
>
> It seems that I'm missing a step here.
>
>
> Connection closed by foreign host.
>
> -----Original Message-----
> From: Peter Vogel [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 29, 2001 4:21 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: CVS and Ant build tool
>
>
> You must connect to port 2401, or whatever port you set up your
> CVS pserver to service.
>
> The authentication protocol shown below is for a running pserver,
> if you are not running with pserver, the protocol is different.
>
> -Peter
>
> > -----Original Message-----
> > From: Cheng, John [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, January 29, 2001 4:16 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: CVS and Ant build tool
> >
> >
> > This is an extract from the CVS src code, server.c
> >
> > It seems to indicate a method of communicating with CVS and
> > loggin in via
> > telnet.
> > Yet I cannot duplicate this manually, can anyone help?
> >
> > /* The Authentication Protocol. Client sends:
> > *
> > * BEGIN AUTH REQUEST\n
> > * <REPOSITORY>\n
> > * <USERNAME>\n
> > * <PASSWORD>\n
> > * END AUTH REQUEST\n
> > *
> > * Server uses above information to authenticate, then sends
> > *
> > * I LOVE YOU\n
> > *
> > * if it grants access, else
> > *
> > * I HATE YOU\n
> > *
> > * if it denies access (and it exits if denying).
> > *
> > * When the client is "cvs login", the user does not
> desire actual
> > * repository access, but would like to confirm the
> password with
> > * the server. In this case, the start and stop strings are
> > *
> > * BEGIN VERIFICATION REQUEST\n
> > *
> > * and
> > *
> > * END VERIFICATION REQUEST\n
> > *
> > * On a verification request, the server's responses
> are the same
> > * (with the obvious semantics), but it exits immediately after
> > * sending the response in both cases.
> > *
> > * Why is the repository sent? Well, note that the actual
> > * client/server protocol can't start up until authentication is
> > * successful. But in order to perform authentication,
> the server
> > * needs to look up the password in the special CVS passwd file,
> > * before trying /etc/passwd. So the client transmits the
> > * repository as part of the "authentication protocol". The
> > * repository will be redundantly retransmitted later,
> > but that's no
> > * big deal.
> > */
> >
> > #ifdef SO_KEEPALIVE
> > /* Set SO_KEEPALIVE on the socket, so that we don't hang forever
> > if the client dies while we are waiting for input. */
> > {
> > int on = 1;
> >
> > (void) setsockopt (STDIN_FILENO, SOL_SOCKET, SO_KEEPALIVE,
> > (char *) &on, sizeof on);
> > }
> > #endif
> >
> > /* Make sure the protocol starts off on the right foot... */
> > if (getline_safe (&tmp, &tmp_allocated, stdin, PATH_MAX) < 0)
> > /* FIXME: what? We could try writing error/eof, but chances
> > are the network connection is dead bidirectionally. log it
> > somewhere? */
> > ;
> >
> > if (strcmp (tmp, "BEGIN VERIFICATION REQUEST\n") == 0)
> > verify_and_exit = 1;
> > else if (strcmp (tmp, "BEGIN AUTH REQUEST\n") == 0)
> > ;
> > else if (strcmp (tmp, "BEGIN GSSAPI REQUEST\n") == 0)
> > {
> > #ifdef HAVE_GSSAPI
> > free (tmp);
> > gserver_authenticate_connection ();
> > return;
> > #else
> > error (1, 0, "GSSAPI authentication not supported by
> > this server");
> > #endif
> > }
> > else
> > error (1, 0, "bad auth protocol start: %s", tmp);
> >
> > #ifndef AUTH_SERVER_SUPPORT
> >
> > error (1, 0, "Password authentication not supported by
> > this server");
> >
> >
>