#!/usr/local/bin/perl # # This script is used to allow the "ufsdump" program to issue remote tape # commands without setting up a user id that will actually be allowed to # issue real commands via remote shell (/usr/bin/rsh). # # In order to do remote tape backups, the ufsdump command uses the rsh # mechanisim to run the /etc/rmt command. This command reads standard in, # and accepts commands and steams of data that are then redirected to # the local tape device on the # tape host system. # # If you set this script up as the login shell for a "tape" user id, the # you can set up the ".rhosts" file for the "tape" user id, and the only # command that can be executed via rsh for this id will be "/etc/rmt". # # Andy Welter # www.the-welters.com # June 1999 # $parm1=$ARGV[0]; $parm2=$ARGV[1]; if ( $parm1 eq "-c" && $parm2 eq "/etc/rmt" ) { system ("/etc/rmt"); };