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");
>
>