From: Ezra Peisach Date: Mon, 6 May 1996 15:57:21 +0000 (+0000) Subject: * default.exp: Add procedure setup_wrapper to first setup shared library X-Git-Tag: krb5-1.0-beta6~140 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=70d6533250abf9113b76313ba4cf1445640ddd0e;p=krb5.git * default.exp: Add procedure setup_wrapper to first setup shared library environment variables and the exec program. This allows for easy testing of "rsh $hostname klist" which would normally fail due to shared libraries not being setup. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7902 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/tests/dejagnu/config/ChangeLog b/src/tests/dejagnu/config/ChangeLog index 83a1ed655..62e2e1312 100644 --- a/src/tests/dejagnu/config/ChangeLog +++ b/src/tests/dejagnu/config/ChangeLog @@ -1,3 +1,8 @@ +Mon May 6 11:54:20 1996 Ezra Peisach + + * default.exp: Add procedure setup_wrapper to first setup shared + library environment variables and the exec program + Sat May 4 11:56:17 1996 Ezra Peisach (epeisach@kangaroo.mit.edu) * default.exp: For stty_init set to \^h as on some /bin/sh, ^ is diff --git a/src/tests/dejagnu/config/default.exp b/src/tests/dejagnu/config/default.exp index ab6e7ef95..c5102b606 100644 --- a/src/tests/dejagnu/config/default.exp +++ b/src/tests/dejagnu/config/default.exp @@ -1301,3 +1301,30 @@ proc touch { file } { proc tail1 { file } { exec tail -1 $file } + +# setup_wrapper +# Sets up a wraper script to set the runtime shared library environment +# variables and then executes a specific command. This is used to allow +# a "rsh klist" or telnetd to execute login.krb5. +proc setup_wrapper { file command } { + global BINSH + global env + global krb5_init_vars + + # We will start with a BINSH script + catch "exec rm -f $file" + + set f [open $file "w" 0777] + puts $f "#!$BINSH" + foreach i $krb5_init_vars { + regexp "^(\[^=\]*)=(.*)" $i foo evar evalue + puts $f "$evar=$env($evar)" + puts $f "export $evar" + } + puts $f "exec $command" + close $f + + return 1 +} + +