# HG changeset patch # User Rich Burridge # Date 1320684795 28800 # Node ID a9e52e69dd2898a6761028a992ad6ee6387bc517 # Parent 50a0252e05e89e726aae403d910addc53a616b20 PSARC 2011/351 GNU tar ssh remote shell support 6946838 gtar may use ssh instead of rsh by default diff -r 50a0252e05e8 -r a9e52e69dd28 components/gtar/Makefile --- a/components/gtar/Makefile Mon Nov 07 08:37:31 2011 -0800 +++ b/components/gtar/Makefile Mon Nov 07 08:53:15 2011 -0800 @@ -36,6 +36,9 @@ # workaround for CR 6998994 sparc_COPTFLAG = -xO2 +# Use ssh (rather than rsh) for remote commands. +CONFIGURE_ENV += "RSH=/usr/bin/ssh" + CONFIGURE_OPTIONS += --with-rmt=/usr/sbin/rmt CONFIGURE_OPTIONS += --libexecdir=/usr/sbin CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" diff -r 50a0252e05e8 -r a9e52e69dd28 components/gtar/gtar.p5m --- a/components/gtar/gtar.p5m Mon Nov 07 08:37:31 2011 -0800 +++ b/components/gtar/gtar.p5m Mon Nov 07 08:53:15 2011 -0800 @@ -165,6 +165,7 @@ depend fmri=__TBD pkg.debug.depend.file=usr/bin/bzip2 type=require depend fmri=__TBD pkg.debug.depend.file=usr/bin/compress type=require depend fmri=__TBD pkg.debug.depend.file=usr/bin/gzip type=require +depend fmri=__TBD pkg.debug.depend.file=usr/bin/ssh type=require legacy pkg=SUNWgtar \ desc="GNU tar - A utility used to store, backup, and transport files (gtar) 1.25" \ diff -r 50a0252e05e8 -r a9e52e69dd28 components/gtar/patches/remote-shell.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/gtar/patches/remote-shell.patch Mon Nov 07 08:53:15 2011 -0800 @@ -0,0 +1,121 @@ +--- tar-1.26/src/tar.c.orig Fri Oct 28 08:14:09 2011 ++++ tar-1.26/src/tar.c Fri Oct 28 08:14:31 2011 +@@ -536,7 +536,7 @@ + {"rmt-command", RMT_COMMAND_OPTION, N_("COMMAND"), 0, + N_("use given rmt COMMAND instead of rmt"), GRID+1 }, + {"rsh-command", RSH_COMMAND_OPTION, N_("COMMAND"), 0, +- N_("use remote COMMAND instead of rsh"), GRID+1 }, ++ N_("use remote COMMAND instead of ssh"), GRID+1 }, + #ifdef DEVICE_PREFIX + {"-[0-7][lmh]", 0, NULL, OPTION_DOC, /* It is OK, since `name' will never be + translated */ +--- tar-1.26/doc/tar.info-1.orig Fri Oct 28 08:21:28 2011 ++++ tar-1.26/doc/tar.info-1 Fri Oct 28 08:29:55 2011 +@@ -2821,7 +2821,7 @@ + + $ tar --show-defaults + --format=gnu -f- -b20 --quoting-style=escape +- --rmt-command=/usr/libexec/rmt --rsh-command=/usr/bin/rsh ++ --rmt-command=/usr/libexec/rmt --rsh-command=/usr/bin/ssh + + Notice, that this option outputs only one line. The example output + above has been split to fit page boundaries. +@@ -3144,7 +3144,7 @@ + + $ tar --show-defaults + --format=gnu -f- -b20 --quoting-style=escape +- --rmt-command=/etc/rmt --rsh-command=/usr/bin/rsh ++ --rmt-command=/etc/rmt --rsh-command=/usr/bin/ssh + + Notice, that this option outputs only one line. The example output + above has been split to fit page boundaries. +@@ -3153,7 +3153,7 @@ + `gnu' archive format (*note Formats::), it uses standard output as the + archive, if no `--file' option has been given (*note file tutorial::), + the default blocking factor is 20 (*note Blocking Factor::). It also +-shows the default locations where `tar' will look for `rmt' and `rsh' ++shows the default locations where `tar' will look for `rmt' and `ssh' + binaries. + +  +@@ -5383,8 +5383,8 @@ + Full file name of `mt' binary. + + -- Backup variable: RSH +- Full file name of `rsh' binary or its equivalent. You may wish to +- set it to `ssh', to improve security. In this case you will have ++ Full file name of `rsh' binary or its equivalent. This has been ++ set to `ssh', to improve security. In this case you will have + to use public key authentication. + + -- Backup variable: RSH_COMMAND +@@ -5538,9 +5538,9 @@ + BACKUP_HOUR=1 + TAPE_FILE=/dev/nrsmt0 + +- # Use `ssh' instead of the less secure `rsh' +- RSH=/usr/bin/ssh +- RSH_COMMAND=/usr/bin/ssh ++ # Use `rsh' instead of the more secure `ssh' ++ RSH=/usr/bin/rsh ++ RSH_COMMAND=/usr/bin/rsh + + # Override MT_STATUS function: + my_status() { +@@ -5837,10 +5837,10 @@ + If the archive file name includes a colon (`:'), then it is assumed + to be a file on another machine. If the archive file is + `USER@HOST:FILE', then FILE is used on the host HOST. The remote host +-is accessed using the `rsh' program, with a username of USER. If the ++is accessed using the `ssh' program, with a username of USER. If the + username is omitted (along with the `@' sign), then your user name will +-be used. (This is the normal `rsh' behavior.) It is necessary for the +-remote machine, in addition to permitting your `rsh' access, to have ++be used. (This is the normal `ssh' behavior.) It is necessary for the ++remote machine, in addition to permitting your `ssh' access, to have + the `rmt' program installed (this command is included in the GNU `tar' + distribution and by default is installed under `PREFIX/libexec/rmt', + where PREFIX means your installation prefix). If you need to use a +@@ -6844,7 +6844,7 @@ + `H' + Do not apply transformation to hard link targets. + +- Default is `rsh', which means to apply tranformations to both archive ++ Default is `ssh', which means to apply tranformations to both archive + members and targets of symbolic and hard links. + + Default scope flags can also be changed using `flags=' statement in +--- tar-1.26/doc/tar.info-2.orig Fri Oct 28 08:21:38 2011 ++++ tar-1.26/doc/tar.info-2 Fri Oct 28 08:38:38 2011 +@@ -1503,9 +1503,9 @@ + If the file name contains a `:', it is interpreted as `hostname:file + name'. If the HOSTNAME contains an "at" sign (`@'), it is treated as + `user@hostname:file name'. In either case, `tar' will invoke the +-command `rsh' (or `remsh') to start up an `/usr/libexec/rmt' on the ++command `ssh' (or `remsh') to start up an `/usr/libexec/rmt' on the + remote machine. If you give an alternate login name, it will be given +-to the `rsh'. Naturally, the remote machine must have an executable ++to the `ssh'. Naturally, the remote machine must have an executable + `/usr/libexec/rmt'. This program is free software from the University + of California, and a copy of the source code can be found with the + sources for `tar'; it's compiled and installed by default. The exact +@@ -1553,8 +1553,8 @@ + Archive file is local even if it contains a colon. + + `--rsh-command=COMMAND' +- Use remote COMMAND instead of `rsh'. This option exists so that +- people who use something other than the standard `rsh' (e.g., a ++ Use remote COMMAND instead of `ssh'. This option exists so that ++ people who use something other than the standard `ssh' (e.g., a + Kerberized `rsh') can access a remote device. + + When this command is not used, the shell command found when the +@@ -1618,7 +1618,7 @@ + remote tape server written at the University of California at Berkeley. + The remote tape server must be installed as `PREFIX/libexec/rmt' on any + machine whose tape drive you want to use. `tar' calls `rmt' by running +-an `rsh' or `remsh' to the remote machine, optionally using a different ++an `ssh' or `remsh' to the remote machine, optionally using a different + login name if one is supplied. + + A copy of the source for the remote tape server is provided. It is