From: Ezra Peisach Date: Tue, 7 May 1996 01:14:09 +0000 (+0000) Subject: Use a wrapper script for the rcp started from kshd. This change cleans up the X-Git-Tag: krb5-1.0-beta6~134 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c65af8a8579f4a1e97d42e34f4652ea109ca9afd;p=krb5.git Use a wrapper script for the rcp started from kshd. This change cleans up the test as written. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7908 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/tests/dejagnu/krb-standalone/ChangeLog b/src/tests/dejagnu/krb-standalone/ChangeLog index 06518e500..e15c07203 100644 --- a/src/tests/dejagnu/krb-standalone/ChangeLog +++ b/src/tests/dejagnu/krb-standalone/ChangeLog @@ -1,5 +1,8 @@ Mon May 6 08:05:33 1996 Ezra Peisach + * rcp.exp: Use a wrapper script to set up the remote rcp as + started from kshd. + * rsh.exp: Setup a wrapper script in executing klist in the remote shell so that environment variables are properly set. diff --git a/src/tests/dejagnu/krb-standalone/rcp.exp b/src/tests/dejagnu/krb-standalone/rcp.exp index 8e8b56966..a51196c5d 100644 --- a/src/tests/dejagnu/krb-standalone/rcp.exp +++ b/src/tests/dejagnu/krb-standalone/rcp.exp @@ -15,6 +15,9 @@ if ![info exists KRSHD] { set KRSHD [findfile $objdir/../../appl/bsd/kshd] } +# Remove old wrapper script + catch "exec rm -f $tmppwd/rcp" + # Make sure .k5login is reasonable. if ![check_k5login rcp] { return @@ -38,17 +41,13 @@ proc start_rsh_daemon { } { global tmppwd global krshd_spawn_id global krshd_pid - global krb5_init_vars - - set opt(0) "" - set opt(1) "" - set opt(2) "" - set opt(3) "" - for {set i 0} {$i < [llength $krb5_init_vars]} {incr i} { - regexp "^(\[^=\]*)=(.*)" [lindex $krb5_init_vars $i] foo evar evalue - set opt($i) "-L$evar" + + # Setup the shared library wrapper for login.krb5 + if ![file exists $tmppwd/rcp] { + setup_wrapper $tmppwd/rcp "$RCP $*" } + # The -D argument tells it to accept a single connection, so we # don't need to use inetd. The 3544 is the port to listen at. # @@ -58,7 +57,7 @@ proc start_rsh_daemon { } { # a users shell might be sh... # Later a proper fix would be to have kshd exec rcp directly # shell indirection... - spawn $KRSHD -k -c -D 3544 -P [file dirname $RCP] -S $tmppwd/srvtab -M $REALMNAME -L ENV_SET $opt(0) $opt(1) $opt(2) $opt(3) + spawn $KRSHD -k -c -D 3544 -P $tmppwd -S $tmppwd/srvtab -M $REALMNAME -L ENV_SET set krshd_spawn_id $spawn_id set krshd_pid [exp_pid]