Log message: * configure.in (WITH_RSH): Add --with-rsh configure option. The default is still "rsh" but it will look for "ssh" if "rsh" is not found on the system. * configure: Regenerated. * config.h.in: Ditto. * Makefile.in: Ditto. * doc/cvs.texinfo (Connecting via rsh): Document that --with-rsh may be used to specify the default "rsh" program to use. * doc/stamp-vti: Regenerated. * doc/version.texi: Ditto. * emx/config.h (RSH_DFLT): Default to "rsh". * man/cvs.1 (CVS_RSH): Note that the default "rsh" value may be set by the --with-rsh configure option. * os2/config.h (RSH_DFLT): Default to "rsh". * src/client.c (start_rsh_server): Use new definition of RSH_DFLT to allow "rsh" to be configured to default to "ssh" or some other local remote transport program. * vms/config.h (RSH_DFLT): Default to "rsh". * windows-NT/config.h (RSH_DFLT): Default to "rsh". Index: ChangeLog =================================================================== RCS file: /cvs/ccvs/ChangeLog,v retrieving revision 1.706 diff -u -p -r1.706 ChangeLog --- ChangeLog 16 Mar 2003 20:47:39 -0000 1.706 +++ ChangeLog 19 Mar 2003 14:52:12 -0000 @@ -1,3 +1,13 @@ +2003-03-19 Mark D. Baushke + + * configure.in (WITH_RSH): Add --with-rsh configure option. The + default is still "rsh" but it will look for "ssh" if "rsh" is not + found on the system. + + * configure: Regenerated. + * config.h.in: Ditto. + * Makefile.in: Ditto + 2003-03-16 Mark D. Baushke * NEWS (changes since 1.11.5): Mention CVSREADONLYFS environment Index: Makefile.in =================================================================== RCS file: /cvs/ccvs/Makefile.in,v retrieving revision 1.89 diff -u -p -r1.89 Makefile.in --- Makefile.in 25 Feb 2003 21:33:57 -0000 1.89 +++ Makefile.in 19 Mar 2003 14:52:12 -0000 @@ -101,6 +101,7 @@ am__include = @am__include@ am__quote = @am__quote@ includeopt = @includeopt@ install_sh = @install_sh@ +with_default_rsh = @with_default_rsh@ # Unix source subdirs, where we'll want to run lint and etags: # This is a legacy variable from b4 Automake Index: config.h.in =================================================================== RCS file: /cvs/ccvs/config.h.in,v retrieving revision 1.73 diff -u -p -r1.73 config.h.in --- config.h.in 4 Mar 2003 22:47:08 -0000 1.73 +++ config.h.in 19 Mar 2003 14:52:12 -0000 @@ -403,6 +403,10 @@ /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE +/* The default remote shell to use, if one does not specify the CVS_RSH + environment variable. */ +#undef RSH_DFLT + /* If you are working with a large remote repository and a 'cvs checkout' is swamping your network and memory, define these to enable flow control. You will end up with even less probability of a consistent checkout (see Index: configure =================================================================== RCS file: /cvs/ccvs/configure,v retrieving revision 1.179 diff -u -p -r1.179 configure --- configure 4 Mar 2003 22:47:08 -0000 1.179 +++ configure 19 Mar 2003 14:52:12 -0000 @@ -873,6 +873,8 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-krb4 Kerberos 4 directory (default /usr/kerberos) --with-gssapi GSSAPI directory (default autoselects) + --with-rsh The default remote shell CVS will use for :ext: + transport (default rsh) --with-editor The default text editor CVS should use for log messages (default autoselects) --with-tmpdir The temporary directory CVS should use as a default @@ -9397,6 +9399,90 @@ fi +# Let the confiscator request a specific remote shell + +# Check whether --with-rsh or --without-rsh was given. +if test "${with_rsh+set}" = set; then + withval="$with_rsh" + +else + with_rsh="rsh ssh" +fi; + +if test no = "$with_rsh"; then + { echo "$as_me:$LINENO: WARNING: Failed to find usable remote shell. Using 'rsh'." >&5 +echo "$as_me: WARNING: Failed to find usable remote shell. Using 'rsh'." >&2;} + with_rsh=rsh +elif test yes = "$with_rsh"; then + # Make --with-rsh mean the same thing as --with-rsh=rsh + with_rsh=rsh +fi + +if echo $with_rsh |grep ^/ >/dev/null; then + # If $with_rsh is an absolute path, issue a warning if the executable + # doesn't exist or isn't usable, but then trust the user and use it + # regardless + with_default_rsh=$with_rsh + echo "$as_me:$LINENO: checking for a remote shell" >&5 +echo $ECHO_N "checking for a remote shell... $ECHO_C" >&6 + if ! test -f $with_rsh \ + || ! test -x $with_rsh; then + # warn the user that they may encounter problems + { echo "$as_me:$LINENO: WARNING: $with_rsh is not a path to an executable file" >&5 +echo "$as_me: WARNING: $with_rsh is not a path to an executable file" >&2;} + fi +else + # Search for a remote shell + for ac_prog in $with_rsh +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_with_default_rsh+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$with_default_rsh"; then + ac_cv_prog_with_default_rsh="$with_default_rsh" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_with_default_rsh="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +with_default_rsh=$ac_cv_prog_with_default_rsh +if test -n "$with_default_rsh"; then + echo "$as_me:$LINENO: result: $with_default_rsh" >&5 +echo "${ECHO_T}$with_default_rsh" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$with_default_rsh" && break +done +test -n "$with_default_rsh" || with_default_rsh=""rsh"" + +fi + + +cat >>confdefs.h <<_ACEOF +#define RSH_DFLT "$with_default_rsh" +_ACEOF + + + @@ -10657,6 +10743,7 @@ s,@MAKE_TARGETS_IN_VPATH_FALSE@,$MAKE_TA s,@LIBOBJS@,$LIBOBJS,;t t s,@KRB4@,$KRB4,;t t s,@includeopt@,$includeopt,;t t +s,@with_default_rsh@,$with_default_rsh,;t t s,@EDITOR@,$EDITOR,;t t CEOF Index: configure.in =================================================================== RCS file: /cvs/ccvs/configure.in,v retrieving revision 1.181 diff -u -p -r1.181 configure.in --- configure.in 4 Mar 2003 22:47:08 -0000 1.181 +++ configure.in 19 Mar 2003 14:52:12 -0000 @@ -391,6 +391,54 @@ dnl fails unless called after the KRB4 s dnl ACX_WITH_GSSAPI +dnl +dnl begin --with-rsh +dnl +dnl Many sites no longer desire the use of "rsh" as the default +dnl remote shell program. They typically favor "ssh" as the default + +# Let the confiscator request a specific remote shell +AC_ARG_WITH( + [rsh], + AC_HELP_STRING( + [--with-rsh], + [The default remote shell CVS will use for :ext: transport + (default rsh)]), , + [with_rsh="rsh ssh"]) + +if test no = "$with_rsh"; then + AC_MSG_WARN([Failed to find usable remote shell. Using 'rsh'.]) + with_rsh=rsh +elif test yes = "$with_rsh"; then + # Make --with-rsh mean the same thing as --with-rsh=rsh + with_rsh=rsh +fi + +if echo $with_rsh |grep ^/ >/dev/null; then + # If $with_rsh is an absolute path, issue a warning if the executable + # doesn't exist or isn't usable, but then trust the user and use it + # regardless + with_default_rsh=$with_rsh + AC_MSG_CHECKING([for a remote shell]) + if ! test -f $with_rsh \ + || ! test -x $with_rsh; then + # warn the user that they may encounter problems + AC_MSG_WARN([$with_rsh is not a path to an executable file]) + fi +else + # Search for a remote shell + AC_CHECK_PROGS([with_default_rsh], [$with_rsh], "rsh") +fi + +AC_DEFINE_UNQUOTED( + [RSH_DFLT], ["$with_default_rsh"], + [The default remote shell to use, if one does not specify the + CVS_RSH environment variable.]) + +dnl done with finding a default CVS_RSH value +dnl +dnl end --with-rsh +dnl dnl dnl begin --with-editor Index: doc/ChangeLog =================================================================== RCS file: /cvs/ccvs/doc/ChangeLog,v retrieving revision 1.739 diff -u -p -r1.739 ChangeLog --- doc/ChangeLog 16 Mar 2003 20:47:39 -0000 1.739 +++ doc/ChangeLog 19 Mar 2003 14:52:12 -0000 @@ -1,3 +1,11 @@ +2003-03-19 Mark D. Baushke + + * cvs.texinfo (Connecting via rsh): Document that --with-rsh may + be used to specify the default "rsh" program to use. + + * stamp-vti: Regenerated. + * version.texi: Ditto. + 2003-03-16 Mark D. Baushke * cvs.texinfo (Global options): Document new `-R' global option Index: doc/cvs.texinfo =================================================================== RCS file: /cvs/ccvs/doc/cvs.texinfo,v retrieving revision 1.560 diff -u -p -r1.560 cvs.texinfo --- doc/cvs.texinfo 16 Mar 2003 20:47:39 -0000 1.560 +++ doc/cvs.texinfo 19 Mar 2003 14:52:12 -0000 @@ -2174,7 +2174,9 @@ For information on disk space requiremen @sc{cvs} uses the @samp{rsh} protocol to perform these operations, so the remote user host needs to have a @file{.rhosts} file which grants access to the local -user. +user. Note that the program that @sc{cvs} uses for this +purpose may be specified using the @file{--with-rsh} +flag to configure. For example, suppose you are the user @samp{mozart} on the local machine @samp{toe.example.com}, and the @@ -2221,7 +2223,8 @@ There are two access methods that you us for rsh. @code{:server:} specifies an internal rsh client, which is supported only by some @sc{cvs} ports. @code{:ext:} specifies an external rsh program. By -default this is @code{rsh} but you may set the +default this is @code{rsh} (unless otherwise specified +by the @file{--with-rsh} flag to configure) but you may set the @code{CVS_RSH} environment variable to invoke another program which can access the remote server (for example, @code{remsh} on HP-UX 9 because @code{rsh} is Index: doc/stamp-vti =================================================================== RCS file: /cvs/ccvs/doc/stamp-vti,v retrieving revision 1.29 diff -u -p -r1.29 stamp-vti --- doc/stamp-vti 16 Mar 2003 20:47:39 -0000 1.29 +++ doc/stamp-vti 19 Mar 2003 14:52:12 -0000 @@ -1,4 +1,4 @@ -@set UPDATED 16 March 2003 +@set UPDATED 19 March 2003 @set UPDATED-MONTH March 2003 @set EDITION 1.12.0.1 @set VERSION 1.12.0.1 Index: doc/version.texi =================================================================== RCS file: /cvs/ccvs/doc/version.texi,v retrieving revision 1.30 diff -u -p -r1.30 version.texi --- doc/version.texi 16 Mar 2003 20:47:39 -0000 1.30 +++ doc/version.texi 19 Mar 2003 14:52:12 -0000 @@ -1,4 +1,4 @@ -@set UPDATED 16 March 2003 +@set UPDATED 19 March 2003 @set UPDATED-MONTH March 2003 @set EDITION 1.12.0.1 @set VERSION 1.12.0.1 Index: emx/ChangeLog =================================================================== RCS file: /cvs/ccvs/emx/ChangeLog,v retrieving revision 1.34 diff -u -p -r1.34 ChangeLog --- emx/ChangeLog 19 Dec 2002 17:17:24 -0000 1.34 +++ emx/ChangeLog 19 Mar 2003 14:52:12 -0000 @@ -1,3 +1,7 @@ +2003-03-19 Mark D. Baushke + + * config.h (RSH_DFLT): Default to "rsh". + 2002-12-19 Derek Price * Makefile.in: Remove reference to options.h. Index: emx/config.h =================================================================== RCS file: /cvs/ccvs/emx/config.h,v retrieving revision 1.8 diff -u -p -r1.8 config.h --- emx/config.h 19 Dec 2002 17:17:24 -0000 1.8 +++ emx/config.h 19 Mar 2003 14:52:13 -0000 @@ -62,6 +62,10 @@ /* Define as the return type of signal handlers (int or void). */ #define RETSIGTYPE void +/* The default remote shell to use, if one does not specify the CVS_RSH + environment variable. */ +#define RSH_DFLT "rsh" + /* Define to `unsigned' if doesn't define. */ /* #undef size_t */ Index: man/ChangeLog =================================================================== RCS file: /cvs/ccvs/man/ChangeLog,v retrieving revision 1.61 diff -u -p -r1.61 ChangeLog --- man/ChangeLog 16 Mar 2003 20:47:40 -0000 1.61 +++ man/ChangeLog 19 Mar 2003 14:52:13 -0000 @@ -1,3 +1,8 @@ +2003-03-19 Mark D. Baushke + + * cvs.1 (CVS_RSH): Note that the default "rsh" value may be set by + the --with-rsh configure option. + 2003-03-16 Mark D. Baushke * cvs.1 (program): Document new `-R' global option for read-only Index: man/cvs.1 =================================================================== RCS file: /cvs/ccvs/man/cvs.1,v retrieving revision 1.33 diff -u -p -r1.33 cvs.1 --- man/cvs.1 16 Mar 2003 20:47:40 -0000 1.33 +++ man/cvs.1 19 Mar 2003 14:52:13 -0000 @@ -2111,7 +2111,8 @@ remote shell command to use when startin .B cvs server. If this variable is not set then .` "rsh" -is used. +is used (unless the --with-rsh flag to configure specified a different +default). .TP .SM CVS_SERVER .B cvs Index: os2/ChangeLog =================================================================== RCS file: /cvs/ccvs/os2/ChangeLog,v retrieving revision 1.192 diff -u -p -r1.192 ChangeLog --- os2/ChangeLog 19 Dec 2002 17:16:55 -0000 1.192 +++ os2/ChangeLog 19 Mar 2003 14:52:13 -0000 @@ -1,3 +1,7 @@ +2003-03-19 Mark D. Baushke + + * config.h (RSH_DFLT): Default to "rsh". + 2002-12-19 Derek Price * Makefile.in: Remove reference to options.h. Index: os2/config.h =================================================================== RCS file: /cvs/ccvs/os2/config.h,v retrieving revision 1.42 diff -u -p -r1.42 config.h --- os2/config.h 19 Dec 2002 17:16:55 -0000 1.42 +++ os2/config.h 19 Mar 2003 14:52:13 -0000 @@ -109,6 +109,10 @@ /* IBMCPP manual indicates they are void. */ #define RETSIGTYPE void +/* The default remote shell to use, if one does not specify the CVS_RSH + environment variable. */ +#define RSH_DFLT "rsh" + /* Define to `unsigned' if doesn't define. */ /* sys/types.h doesn't define it, but stdio.h does, which cvs.h #includes, so things should be okay. */ Index: src/ChangeLog =================================================================== RCS file: /cvs/ccvs/src/ChangeLog,v retrieving revision 1.2388 diff -u -p -r1.2388 ChangeLog --- src/ChangeLog 18 Mar 2003 15:56:33 -0000 1.2388 +++ src/ChangeLog 19 Mar 2003 14:52:13 -0000 @@ -1,3 +1,9 @@ +2003-03-19 Mark D. Baushke + + * client.c (start_rsh_server): Use new definition of RSH_DFLT to + allow "rsh" to be configured to default to "ssh" or some other + local remote transport program. + 2003-03-18 Derek Price * root.c (parse_root): Add some more comments and expand Index: src/client.c =================================================================== RCS file: /cvs/ccvs/src/client.c,v retrieving revision 1.322 diff -u -p -r1.322 client.c --- src/client.c 18 Mar 2003 03:30:04 -0000 1.322 +++ src/client.c 19 Mar 2003 14:52:13 -0000 @@ -4843,7 +4843,7 @@ start_rsh_server (root, to_server, from_ example in CVS_RSH or other such mechanisms to be devised, if that is what they want (the manual already tells them that). */ - cvs_rsh = "rsh"; + cvs_rsh = RSH_DFLT; if (!cvs_server) cvs_server = "cvs"; @@ -4904,7 +4904,7 @@ start_rsh_server (root, to_server, from_ int child_pid; if (!cvs_rsh) - cvs_rsh = "rsh"; + cvs_rsh = RSH_DFLT; if (!cvs_server) cvs_server = "cvs"; Index: vms/ChangeLog =================================================================== RCS file: /cvs/ccvs/vms/ChangeLog,v retrieving revision 1.77 diff -u -p -r1.77 ChangeLog --- vms/ChangeLog 25 Feb 2003 21:30:55 -0000 1.77 +++ vms/ChangeLog 19 Mar 2003 14:52:13 -0000 @@ -1,3 +1,7 @@ +2003-03-19 Mark D. Baushke + + * config.h (RSH_DFLT): Default to "rsh". + 2003-02-25 Derek Price * Makefile.in: Regenerated. Index: vms/config.h =================================================================== RCS file: /cvs/ccvs/vms/config.h,v retrieving revision 1.25 diff -u -p -r1.25 config.h --- vms/config.h 19 Dec 2002 17:10:11 -0000 1.25 +++ vms/config.h 19 Mar 2003 14:52:13 -0000 @@ -64,6 +64,10 @@ /* Define as the return type of signal handlers (int or void). */ #define RETSIGTYPE void +/* The default remote shell to use, if one does not specify the CVS_RSH + environment variable. */ +#define RSH_DFLT "rsh" + /* Define to `unsigned' if doesn't define. */ /* #undef size_t */ Index: windows-NT/ChangeLog =================================================================== RCS file: /cvs/ccvs/windows-NT/ChangeLog,v retrieving revision 1.159 diff -u -p -r1.159 ChangeLog --- windows-NT/ChangeLog 25 Feb 2003 21:30:37 -0000 1.159 +++ windows-NT/ChangeLog 19 Mar 2003 14:52:13 -0000 @@ -1,3 +1,7 @@ +2003-03-19 Mark D. Baushke + + * config.h (RSH_DFLT): Default to "rsh". + 2003-02-25 Derek Price * Makefile.in: Regenerated. Index: windows-NT/config.h =================================================================== RCS file: /cvs/ccvs/windows-NT/config.h,v retrieving revision 1.46 diff -u -p -r1.46 config.h --- windows-NT/config.h 20 Jan 2003 21:58:43 -0000 1.46 +++ windows-NT/config.h 19 Mar 2003 14:52:13 -0000 @@ -336,6 +336,10 @@ extern char *sock_strerror (int errnum); #define REGEX_MALLOC 1 #define _REGEX_RE_COMP 1 +/* The default remote shell to use, if one does not specify the CVS_RSH + environment variable. */ +#define RSH_DFLT "rsh" + /* ssize_t not available under Windows */ typedef int ssize_t;