diff options
author | Ezra Peisach <epeisach@mit.edu> | 1996-05-06 15:57:21 +0000 |
---|---|---|
committer | Ezra Peisach <epeisach@mit.edu> | 1996-05-06 15:57:21 +0000 |
commit | 70d6533250abf9113b76313ba4cf1445640ddd0e (patch) | |
tree | f4d670a8cfdad48d67b364ec10d0086feb93e27d /src/tests/dejagnu | |
parent | 6ee0f2b9c6dd1323e473b77cfe27bca649281057 (diff) | |
download | krb5-70d6533250abf9113b76313ba4cf1445640ddd0e.tar.gz krb5-70d6533250abf9113b76313ba4cf1445640ddd0e.tar.xz krb5-70d6533250abf9113b76313ba4cf1445640ddd0e.zip |
* 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
Diffstat (limited to 'src/tests/dejagnu')
-rw-r--r-- | src/tests/dejagnu/config/ChangeLog | 5 | ||||
-rw-r--r-- | src/tests/dejagnu/config/default.exp | 27 |
2 files changed, 32 insertions, 0 deletions
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 <epeisach@kangaroo.mit.edu> + + * 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 +} + + |