cvs version command may not access a repository.
"valid-requests" is used instead of "noop",
because "noop" command is not RQ_ROOTLESS.
Index: client.c
===================================================================
RCS file: /home2/cvsroot/ccvs/src/client.c,v
retrieving revision 1.285
diff -c -p -r1.285 client.c
*** client.c 2000/07/06 16:20:41 1.285
--- client.c 2000/07/28 04:04:20
*************** the :server: access method is not suppor
*** 4403,4409 ****
stored_mode = NULL;
}
! rootless = (strcmp (command_name, "init") == 0);
if (!rootless)
{
send_to_server ("Root ", 0);
--- 4403,4410 ----
stored_mode = NULL;
}
! rootless = (strcmp (command_name, "init") == 0 ||
! strcmp (command_name, "version") == 0);
if (!rootless)
{
send_to_server ("Root ", 0);
Index: main.c
===================================================================
RCS file: /home2/cvsroot/ccvs/src/main.c,v
retrieving revision 1.152
diff -c -p -r1.152 main.c
*** main.c 2000/07/10 19:34:21 1.152
--- main.c 2000/07/28 04:04:21
*************** Copyright (c) 1989-2000 Brian Berliner,
*** 947,954 ****
if (!isaccessible (path, R_OK | X_OK))
{
save_errno = errno;
! /* If this is "cvs init", the root need not exist yet. */
! if (strcmp (command_name, "init") != 0)
{
error (1, save_errno, "%s", path);
}
--- 947,956 ----
if (!isaccessible (path, R_OK | X_OK))
{
save_errno = errno;
! /* If this is "cvs init/version",
! the root need not exist yet. */
! if (strcmp (command_name, "init") != 0 &&
! strcmp (command_name, "version") != 0)
{
error (1, save_errno, "%s", path);
}
Index: version.c
===================================================================
RCS file: /home2/cvsroot/ccvs/src/version.c,v
retrieving revision 1.101
diff -c -p -r1.101 version.c
*** version.c 2000/07/08 19:57:21 1.101
--- version.c 2000/07/28 04:04:22
*************** version (argc, argv)
*** 64,70 ****
send_to_server ("version\012", 0);
else
{
! send_to_server ("noop\012", 0);
fputs ("(unknown)\n", stdout);
}
err = get_responses_and_close ();
--- 64,71 ----
send_to_server ("version\012", 0);
else
{
! /* send_to_server ("noop\012", 0); */
! send_to_server ("valid-requests\012", 0); /* require RQ_ROOTLESS */
fputs ("(unknown)\n", stdout);
}
err = get_responses_and_close ();
--
KOIE Hidetaka <[EMAIL PROTECTED]>