]> eyrie.org Git - kerberos/perl-kerberos.git/commitdiff
Specify test databases in kdc.conf
authorRuss Allbery <eagle@eyrie.org>
Fri, 28 Feb 2014 08:41:47 +0000 (00:41 -0800)
committerRuss Allbery <eagle@eyrie.org>
Fri, 28 Feb 2014 23:43:19 +0000 (15:43 -0800)
Setting the database when calling kadm5_init_with_password_ctx
doesn't actually work.  Set all the database paths in kdc.conf.

t/data/kdb/kdc.conf
t/kadmin/heimdal.t

index c27fdfc2f3b880b5590b13e5e6e5f82284b1ae73..f4f36119dcb42b90fb37bfedd9e0699bf35d0c32 100644 (file)
@@ -3,9 +3,13 @@
 
 [kdc]
     database = {
-        dbname    = db:./heimdal
+        dbname    = db:./t/tmp/heimdal
         realm     = TEST.EXAMPLE.COM
     }
+    database = {
+        dbname    = db:./t/tmp/bogus
+        realm     = BOGUS.EXAMPLE.COM
+    }
 
 [password_quality]
     policies         = external-check
index 49ba4b169bfa9fa3a15ba007d3b35290fdcfe2af..70c55cd20d9466c4d235bf9ae934631b5323977c 100755 (executable)
@@ -49,14 +49,12 @@ END {
     rmdir('t/tmp');
 }
 
-# Force use of our local kdc.conf, since kadmin library initialization wants
-# to know the host to realm mapping for some reason.
+# Force use of our local kdc.conf.
 local $ENV{KRB5_CONFIG} = 't/data/kdb/kdc.conf';
 
 # Create the Authen::Kerberos::Kadmin object.
 my $kadmin = Authen::Kerberos::Kadmin->new(
     {
-        db_name => 'db:./t/tmp/heimdal',
         realm   => 'TEST.EXAMPLE.COM',
         server  => 1,
         password_quality => 1,
@@ -93,8 +91,7 @@ is(
 # The same should fail if we attempt it with an unknown database.
 $kadmin = Authen::Kerberos::Kadmin->new(
     {
-        db_name => 'db:./t/tmp/bogus',
-        realm   => 'TEST.EXAMPLE.COM',
+        realm   => 'BOGUS.EXAMPLE.COM',
         server  => 1,
     }
 );