]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Always recreate acl files during dejagnu tests
authorTom Yu <tlyu@mit.edu>
Thu, 12 Jul 2012 03:35:44 +0000 (23:35 -0400)
committerTom Yu <tlyu@mit.edu>
Mon, 23 Jul 2012 18:57:03 +0000 (14:57 -0400)
The dejagnu tests create some persistent acl files containing
hostname-derived principal names.  These can get out of date if the
host has changed names since the last time the dejagnu tests were run,
causing failures (notably in iprop.exp).  To avoid this problem,
change the dejagnu tests to always create new acl files for each test
run.

(cherry picked from commit 244bb3fde58dd6bab0969e0501b537c5871088f0)

ticket: 7200
version_fixed: 1.10.3
status: resolved

src/tests/dejagnu/config/default.exp
src/tests/dejagnu/krb-standalone/iprop.exp

index 796ea3716f3b602dde73bee20ed623255655f327..1ed6aa80c8a20f4461056ba84c74ebb408bacb5a 100644 (file)
@@ -874,12 +874,10 @@ proc setup_kerberos_files { } {
     }
 
     # Create ACL file.
-    if ![file exists $tmppwd/acl] {
-       set aclfile [open $tmppwd/acl w]
-       puts $aclfile "krbtest/admin@$REALMNAME *"
-       puts $aclfile "kiprop/$hostname@$REALMNAME p"
-       close $aclfile
-    }
+    set aclfile [open $tmppwd/acl w]
+    puts $aclfile "krbtest/admin@$REALMNAME *"
+    puts $aclfile "kiprop/$hostname@$REALMNAME p"
+    close $aclfile
 
     # Create dictfile file.
     if ![file exists $tmppwd/dictfile] {
index aff4dc2a87042e93ff90e88c6e30c7ad4064b32e..0170bb621d650c9cd3139e21255fa9f732e98a9f 100644 (file)
@@ -5,11 +5,9 @@ proc setup_slave {} {
     global tmppwd hostname REALMNAME KDB5_UTIL
     file delete $tmppwd/slave-stash $tmppwd/slave-acl
     file copy -force $tmppwd/acl $tmppwd/slave-acl
-    if ![file exists $tmppwd/kpropdacl] {
-       set aclfile [open $tmppwd/kpropd-acl w]
-       puts $aclfile "host/$hostname@$REALMNAME"
-       close $aclfile
-    }
+    set aclfile [open $tmppwd/kpropd-acl w]
+    puts $aclfile "host/$hostname@$REALMNAME"
+    close $aclfile
     setup_slave_db
     # copy database - must be used after master db set up
     envstack_push