summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>1996-05-06 15:57:21 +0000
committerEzra Peisach <epeisach@mit.edu>1996-05-06 15:57:21 +0000
commit70d6533250abf9113b76313ba4cf1445640ddd0e (patch)
treef4d670a8cfdad48d67b364ec10d0086feb93e27d /src
parent6ee0f2b9c6dd1323e473b77cfe27bca649281057 (diff)
downloadkrb5-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')
-rw-r--r--src/tests/dejagnu/config/ChangeLog5
-rw-r--r--src/tests/dejagnu/config/default.exp27
2 files changed, 32 insertions, 0 deletions
diff --git a/src/tests/dejagnu/config/ChangeLog b/src/tests/dejagnu/config/ChangeLog
index 83a1ed655b..62e2e13122 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 ab6e7ef95c..c5102b6064 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
+}
+
+