* unit-test/Makefile.in, unit-test/kpasswd.0/principal.exp: use
authorBarry Jaspan <bjaspan@mit.edu>
Thu, 26 Sep 1996 21:51:54 +0000 (21:51 +0000)
committerBarry Jaspan <bjaspan@mit.edu>
Thu, 26 Sep 1996 21:51:54 +0000 (21:51 +0000)
  whoami instead of user (USER princ now created by init_db)

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9123 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/passwd/ChangeLog
src/kadmin/passwd/unit-test/Makefile.in
src/kadmin/passwd/unit-test/kpasswd.0/principal.exp

index 09ac420ac9bbc8034074835629c55ece55a5cefe..8ea7fa3211a9e0e6db354eff5f8b5471553aaffe 100644 (file)
@@ -1,3 +1,8 @@
+Thu Sep 26 17:50:23 1996  Barry Jaspan  <bjaspan@mit.edu>
+
+       * unit-test/Makefile.in, unit-test/kpasswd.0/principal.exp: use
+       whoami instead of user (USER princ now created by init_db)
+
 Fri Sep 20 17:32:19 1996  Barry Jaspan  <bjaspan@mit.edu>
 
        * configure.in: add unit-test subdirectory
index aa25eea70b575dffef2f5e80435d3b2773f5d29e..76ca9e067e8ca878fc807b831fa5e9dc11c4de62 100644 (file)
@@ -1,16 +1,12 @@
-USER = root
-
 check unit-test:: unit-test-setup unit-test-body unit-test-cleanup
 
 unit-test-body::       
-       $(ENV_SETUP) $(RUNTEST) KPASSWD=../kpasswd \
+       $(ENV_SETUP) $(RUNTEST) --tool kpasswd KPASSWD=../kpasswd \
                KINIT=$(BUILDTOP)/clients/kinit/kinit \
-               KDESTROY=$(BUILDTOP)/clients/kdestroy/kdestroy \
-               USER=$(USER) --tool kpasswd
+               KDESTROY=$(BUILDTOP)/clients/kdestroy/kdestroy
     
 unit-test-setup::
        $(ENV_SETUP) $(START_SERVERS)
-       echo "source \$$env(TCLUTIL); catch {ovsec_kadm_init admin admin \$$OVSEC_KADM_ADMIN_SERVICE null \$$OVSEC_KADM_STRUCT_VERSION \$$OVSEC_KADM_API_VERSION_1 server_handle; ovsec_kadm_create_principal \$$server_handle [simple_principal $(USER)] {OVSEC_KADM_PRINCIPAL} $(USER); ovsec_kadm_destroy \$$server_handle;}; if {[info exists errorInfo]} { puts stderr \$$errorInfo; exit 1; }" | $(ENV_SETUP) $(CLNTTCL)
 
 unit-test-cleanup::
        $(ENV_SETUP) $(STOP_SERVERS)
index e2bc20569751835e196e9fdbd53a63b6c06cee85..9cfff69f6d7a2d1552db07e2e42e8882fab778c2 100644 (file)
@@ -19,7 +19,12 @@ kdestroy
 
 #### no principal specified
 
-set whoami $USER
+if {[info exists env(USER)]} {
+    set whoami $env(USER)
+} else {
+    set whoami [exec whoami]
+}
+
 test_win {} {B.7: default nonexisting ccache(1)} $whoami $whoami newpass
 test_win {} {B.7: default nonexisting ccache(2)} $whoami newpass $whoami