diff --git a/test/sun/security/krb5/auto/AcceptPermissions.java b/test/sun/security/krb5/auto/AcceptPermissions.java index d26f9688a6b90d38fc9be8f28d2107d53a28efd7..9f006a6cd69ad2e41b6e81fb0cb03b8f9e8fea65 100644 --- a/test/sun/security/krb5/auto/AcceptPermissions.java +++ b/test/sun/security/krb5/auto/AcceptPermissions.java @@ -26,8 +26,8 @@ * @bug 9999999 * @summary default principal can act as anyone * @compile -XDignore.symbol.file AcceptPermissions.java - * @run main/othervm AcceptPermissions two - * @run main/othervm AcceptPermissions unbound + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock AcceptPermissions two + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock AcceptPermissions unbound */ import java.nio.file.Files; diff --git a/test/sun/security/krb5/auto/AcceptorSubKey.java b/test/sun/security/krb5/auto/AcceptorSubKey.java index f5e122d030e28e72d2f85cbd9b7060b06613d871..2f322d0567c94f853d3dbec6d1e92fff66c1ef00 100644 --- a/test/sun/security/krb5/auto/AcceptorSubKey.java +++ b/test/sun/security/krb5/auto/AcceptorSubKey.java @@ -26,8 +26,8 @@ * @bug 7077646 * @summary gssapi wrap for CFX per-message tokens always set FLAG_ACCEPTOR_SUBKEY * @compile -XDignore.symbol.file AcceptorSubKey.java - * @run main/othervm AcceptorSubKey 0 - * @run main/othervm AcceptorSubKey 4 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock AcceptorSubKey 0 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock AcceptorSubKey 4 */ import sun.security.jgss.GSSUtil; diff --git a/test/sun/security/krb5/auto/AddressesAndNameType.java b/test/sun/security/krb5/auto/AddressesAndNameType.java index de0dc89491c03bd3d57aff31591b030e0dbf86d1..6df095ebf334dc38c20878c0237a4a6672e3b572 100644 --- a/test/sun/security/krb5/auto/AddressesAndNameType.java +++ b/test/sun/security/krb5/auto/AddressesAndNameType.java @@ -24,9 +24,9 @@ /* * @test * @bug 4501327 4868379 8039132 - * @run main/othervm AddressesAndNameType 1 - * @run main/othervm AddressesAndNameType 2 - * @run main/othervm AddressesAndNameType 3 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock AddressesAndNameType 1 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock AddressesAndNameType 2 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock AddressesAndNameType 3 * @summary noaddresses settings and server name type */ diff --git a/test/sun/security/krb5/auto/BadKdc1.java b/test/sun/security/krb5/auto/BadKdc1.java index dd608939a92a3f78aa58805fa0b1de0d525e2354..0170cd3563ff68167c24bdcc0e2e2c5e403d3d0b 100644 --- a/test/sun/security/krb5/auto/BadKdc1.java +++ b/test/sun/security/krb5/auto/BadKdc1.java @@ -24,7 +24,7 @@ /* * @test * @bug 6843127 - * @run main/othervm/timeout=300 BadKdc1 + * @run main/othervm/timeout=300 -Dsun.net.spi.nameservice.provider.1=ns,mock BadKdc1 * @summary krb5 should not try to access unavailable kdc too often */ diff --git a/test/sun/security/krb5/auto/BadKdc2.java b/test/sun/security/krb5/auto/BadKdc2.java index 4291d5c14c0947c0c2a0eb73bc300d5bd3b39cfe..218aa7b952f8305b8fdf70de15a9801b6ffd0925 100644 --- a/test/sun/security/krb5/auto/BadKdc2.java +++ b/test/sun/security/krb5/auto/BadKdc2.java @@ -24,7 +24,7 @@ /* * @test * @bug 6843127 - * @run main/othervm/timeout=300 BadKdc2 + * @run main/othervm/timeout=300 -Dsun.net.spi.nameservice.provider.1=ns,mock BadKdc2 * @summary krb5 should not try to access unavailable kdc too often */ diff --git a/test/sun/security/krb5/auto/BadKdc3.java b/test/sun/security/krb5/auto/BadKdc3.java index 4bafd9a2ffee75b59a0587ddec5afd2b2c06bfc4..d5c5f877b9be9c56eb44832749cb611ee8250980 100644 --- a/test/sun/security/krb5/auto/BadKdc3.java +++ b/test/sun/security/krb5/auto/BadKdc3.java @@ -24,7 +24,7 @@ /* * @test * @bug 6843127 - * @run main/othervm/timeout=300 BadKdc3 + * @run main/othervm/timeout=300 -Dsun.net.spi.nameservice.provider.1=ns,mock BadKdc3 * @summary krb5 should not try to access unavailable kdc too often */ diff --git a/test/sun/security/krb5/auto/BadKdc4.java b/test/sun/security/krb5/auto/BadKdc4.java index 877e5400df999716c7c7256811494d17a055327c..14f078e75fdbb86a5e246152c89d30ae2d7d3da2 100644 --- a/test/sun/security/krb5/auto/BadKdc4.java +++ b/test/sun/security/krb5/auto/BadKdc4.java @@ -24,7 +24,7 @@ /* * @test * @bug 6843127 - * @run main/othervm/timeout=300 BadKdc4 + * @run main/othervm/timeout=300 -Dsun.net.spi.nameservice.provider.1=ns,mock BadKdc4 * @summary krb5 should not try to access unavailable kdc too often */ diff --git a/test/sun/security/krb5/auto/Basic.java b/test/sun/security/krb5/auto/Basic.java index ef7f11db5099abe236f717d3b111a4c46fe15145..7ec3873fb6375cb0d81bd969598b736e8905c45d 100644 --- a/test/sun/security/krb5/auto/Basic.java +++ b/test/sun/security/krb5/auto/Basic.java @@ -26,7 +26,7 @@ * @bug 7152176 * @summary More krb5 tests * @compile -XDignore.symbol.file Basic.java - * @run main/othervm Basic + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock Basic */ import sun.security.jgss.GSSUtil; diff --git a/test/sun/security/krb5/auto/BasicKrb5Test.java b/test/sun/security/krb5/auto/BasicKrb5Test.java index 3a60cc2fd9a67dd252adca784801611e07f8c5f8..ade0b54fe38c21afe6be43eb6e87e869eae4b2a3 100644 --- a/test/sun/security/krb5/auto/BasicKrb5Test.java +++ b/test/sun/security/krb5/auto/BasicKrb5Test.java @@ -26,34 +26,34 @@ * @bug 6706974 * @summary Add krb5 test infrastructure * @compile -XDignore.symbol.file BasicKrb5Test.java - * @run main/othervm BasicKrb5Test - * @run main/othervm BasicKrb5Test des-cbc-crc - * @run main/othervm BasicKrb5Test des-cbc-md5 - * @run main/othervm BasicKrb5Test des3-cbc-sha1 - * @run main/othervm BasicKrb5Test aes128-cts - * @run main/othervm BasicKrb5Test aes256-cts - * @run main/othervm BasicKrb5Test rc4-hmac - * @run main/othervm BasicKrb5Test -s - * @run main/othervm BasicKrb5Test des-cbc-crc -s - * @run main/othervm BasicKrb5Test des-cbc-md5 -s - * @run main/othervm BasicKrb5Test des3-cbc-sha1 -s - * @run main/othervm BasicKrb5Test aes128-cts -s - * @run main/othervm BasicKrb5Test aes256-cts -s - * @run main/othervm BasicKrb5Test rc4-hmac -s - * @run main/othervm BasicKrb5Test -C - * @run main/othervm BasicKrb5Test des-cbc-crc -C - * @run main/othervm BasicKrb5Test des-cbc-md5 -C - * @run main/othervm BasicKrb5Test des3-cbc-sha1 -C - * @run main/othervm BasicKrb5Test aes128-cts -C - * @run main/othervm BasicKrb5Test aes256-cts -C - * @run main/othervm BasicKrb5Test rc4-hmac -C - * @run main/othervm BasicKrb5Test -s -C - * @run main/othervm BasicKrb5Test des-cbc-crc -s -C - * @run main/othervm BasicKrb5Test des-cbc-md5 -s -C - * @run main/othervm BasicKrb5Test des3-cbc-sha1 -s -C - * @run main/othervm BasicKrb5Test aes128-cts -s -C - * @run main/othervm BasicKrb5Test aes256-cts -s -C - * @run main/othervm BasicKrb5Test rc4-hmac -s -C + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test des-cbc-crc + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test des-cbc-md5 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test des3-cbc-sha1 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test aes128-cts + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test aes256-cts + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test rc4-hmac + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test -s + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test des-cbc-crc -s + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test des-cbc-md5 -s + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test des3-cbc-sha1 -s + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test aes128-cts -s + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test aes256-cts -s + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test rc4-hmac -s + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test -C + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test des-cbc-crc -C + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test des-cbc-md5 -C + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test des3-cbc-sha1 -C + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test aes128-cts -C + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test aes256-cts -C + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test rc4-hmac -C + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test -s -C + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test des-cbc-crc -s -C + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test des-cbc-md5 -s -C + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test des3-cbc-sha1 -s -C + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test aes128-cts -s -C + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test aes256-cts -s -C + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicKrb5Test rc4-hmac -s -C */ import org.ietf.jgss.GSSName; diff --git a/test/sun/security/krb5/auto/BasicProc.java b/test/sun/security/krb5/auto/BasicProc.java index 54b204fb420313f3e2e317446651cf98c52b6cac..bcc3cd051b40dd174cea091e3a53b00fe32bb108 100644 --- a/test/sun/security/krb5/auto/BasicProc.java +++ b/test/sun/security/krb5/auto/BasicProc.java @@ -27,7 +27,7 @@ * @summary A test library to launch multiple Java processes * @library ../../../../java/security/testlibrary/ * @compile -XDignore.symbol.file BasicProc.java - * @run main/othervm BasicProc + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BasicProc */ import java.io.File; @@ -65,6 +65,9 @@ public class BasicProc { .args("client") .prop("java.security.krb5.conf", CONF) .prop("java.security.manager", "") + .prop("sun.net.spi.nameservice.provider.1", "ns,mock") + .perm(new java.lang.RuntimePermission( + "accessClassInPackage.sun.net.spi.nameservice")) .perm(new java.util.PropertyPermission( "sun.security.krb5.principal", "read")) .perm(new javax.security.auth.AuthPermission( @@ -85,6 +88,9 @@ public class BasicProc { .args("server") .prop("java.security.krb5.conf", CONF) .prop("java.security.manager", "") + .prop("sun.net.spi.nameservice.provider.1", "ns,mock") + .perm(new java.lang.RuntimePermission( + "accessClassInPackage.sun.net.spi.nameservice")) .perm(new java.util.PropertyPermission( "sun.security.krb5.principal", "read")) .perm(new javax.security.auth.AuthPermission( @@ -107,6 +113,9 @@ public class BasicProc { .args("backend") .prop("java.security.krb5.conf", CONF) .prop("java.security.manager", "") + .prop("sun.net.spi.nameservice.provider.1", "ns,mock") + .perm(new java.lang.RuntimePermission( + "accessClassInPackage.sun.net.spi.nameservice")) .perm(new java.util.PropertyPermission( "sun.security.krb5.principal", "read")) .perm(new javax.security.auth.AuthPermission( @@ -185,6 +194,7 @@ public class BasicProc { return p .env("KRB5_CONFIG", CONF) .env("KRB5_KTNAME", KTAB) + .prop("sun.net.spi.nameservice.provider.1", "ns,mock") .prop("sun.security.jgss.native", "true") .prop("javax.security.auth.useSubjectCredsOnly", "false") .prop("sun.security.nativegss.debug", "true"); diff --git a/test/sun/security/krb5/auto/BogusKDC.java b/test/sun/security/krb5/auto/BogusKDC.java index 15d9adddd370cc7bdac8d805386bf50a77401dd0..4b42230b5d56915aa0023db163fc3ec7d7637107 100644 --- a/test/sun/security/krb5/auto/BogusKDC.java +++ b/test/sun/security/krb5/auto/BogusKDC.java @@ -36,7 +36,7 @@ import javax.security.auth.login.LoginException; * @bug 4515853 8075297 * @summary Checks that Kerberos client tries slave KDC * if master KDC is not responding - * @run main/othervm BogusKDC + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock BogusKDC */ public class BogusKDC { diff --git a/test/sun/security/krb5/auto/CleanState.java b/test/sun/security/krb5/auto/CleanState.java index b63e23deffe4b58205b6328066822899cd241f95..2c88503b52a506dd095f67ae408f98e88fc908f7 100644 --- a/test/sun/security/krb5/auto/CleanState.java +++ b/test/sun/security/krb5/auto/CleanState.java @@ -25,7 +25,7 @@ * @test * @bug 6716534 * @compile -XDignore.symbol.file CleanState.java - * @run main/othervm CleanState + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock CleanState * @summary Krb5LoginModule has not cleaned temp info between authentication attempts */ import com.sun.security.auth.module.Krb5LoginModule; diff --git a/test/sun/security/krb5/auto/CrossRealm.java b/test/sun/security/krb5/auto/CrossRealm.java index 26dc6ae641972491d46a380e0a6eb1ddffd12192..823acc3f6935dfb419d8bab6b1333c9d335b2e05 100644 --- a/test/sun/security/krb5/auto/CrossRealm.java +++ b/test/sun/security/krb5/auto/CrossRealm.java @@ -25,7 +25,7 @@ * @test * @bug 6706974 * @compile -XDignore.symbol.file CrossRealm.java - * @run main/othervm CrossRealm + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock CrossRealm * @summary Add krb5 test infrastructure */ import java.io.File; diff --git a/test/sun/security/krb5/auto/DiffNameSameKey.java b/test/sun/security/krb5/auto/DiffNameSameKey.java index 38bacb861e3a9cdc73d27fa8f4d50139f4faa57e..d77d48c0611c43a5b7e457ce4775d4745e482c62 100644 --- a/test/sun/security/krb5/auto/DiffNameSameKey.java +++ b/test/sun/security/krb5/auto/DiffNameSameKey.java @@ -26,8 +26,8 @@ * @bug 8005447 * @summary default principal can act as anyone * @compile -XDignore.symbol.file DiffNameSameKey.java - * @run main/othervm/fail DiffNameSameKey a - * @run main/othervm DiffNameSameKey b + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock DiffNameSameKey a + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock DiffNameSameKey b */ import sun.security.jgss.GSSUtil; diff --git a/test/sun/security/krb5/auto/DupEtypes.java b/test/sun/security/krb5/auto/DupEtypes.java index efc26e825c09cc7b2b46c71d522231c3405f01ae..a59c99592a298fa061cffd64044c9d33b6f327d2 100644 --- a/test/sun/security/krb5/auto/DupEtypes.java +++ b/test/sun/security/krb5/auto/DupEtypes.java @@ -26,11 +26,11 @@ * @bug 7067974 * @summary multiple ETYPE-INFO-ENTRY with same etype and different salt * @compile -XDignore.symbol.file DupEtypes.java - * @run main/othervm DupEtypes 1 - * @run main/othervm DupEtypes 2 - * @run main/othervm/fail DupEtypes 3 - * @run main/othervm DupEtypes 4 - * @run main/othervm DupEtypes 5 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock DupEtypes 1 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock DupEtypes 2 + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock DupEtypes 3 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock DupEtypes 4 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock DupEtypes 5 */ import sun.security.jgss.GSSUtil; diff --git a/test/sun/security/krb5/auto/DynamicKeytab.java b/test/sun/security/krb5/auto/DynamicKeytab.java index dd9e67cac8afd7f75054d2a27d1e3c341a42e8d0..927a37a72a2de03ff151268eed9c4f53164348b9 100644 --- a/test/sun/security/krb5/auto/DynamicKeytab.java +++ b/test/sun/security/krb5/auto/DynamicKeytab.java @@ -25,7 +25,7 @@ * @test * @bug 6894072 * @compile -XDignore.symbol.file DynamicKeytab.java - * @run main/othervm DynamicKeytab + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock DynamicKeytab * @summary always refresh keytab */ diff --git a/test/sun/security/krb5/auto/EmptyPassword.java b/test/sun/security/krb5/auto/EmptyPassword.java index d66b202ec37f48951187752d99f294b6d5dc487a..3e287ebf7fcc9220956e5f43d9359001508ec231 100644 --- a/test/sun/security/krb5/auto/EmptyPassword.java +++ b/test/sun/security/krb5/auto/EmptyPassword.java @@ -26,7 +26,7 @@ * @bug 6879540 * @summary enable empty password for kerberos 5 * @compile -XDignore.symbol.file EmptyPassword.java - * @run main/othervm EmptyPassword + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock EmptyPassword */ public class EmptyPassword { diff --git a/test/sun/security/krb5/auto/FileKeyTab.java b/test/sun/security/krb5/auto/FileKeyTab.java index a8e8377172fefeb64335e49110200a8d8608e421..01cdfa4552715ffea3ca71e53446a0d661aeba43 100644 --- a/test/sun/security/krb5/auto/FileKeyTab.java +++ b/test/sun/security/krb5/auto/FileKeyTab.java @@ -26,7 +26,7 @@ * @bug 7152121 * @summary Krb5LoginModule no longer handles keyTabNames with "file:" prefix * @compile -XDignore.symbol.file FileKeyTab.java - * @run main/othervm FileKeyTab + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock FileKeyTab */ import java.io.File; diff --git a/test/sun/security/krb5/auto/ForwardableCheck.java b/test/sun/security/krb5/auto/ForwardableCheck.java index df6e49ec66b458bb34eff33759488ca50e71dd44..11f7ad712d32d2c02df9d45e1f7450aeeb65e5be 100644 --- a/test/sun/security/krb5/auto/ForwardableCheck.java +++ b/test/sun/security/krb5/auto/ForwardableCheck.java @@ -26,7 +26,7 @@ * @bug 8022582 * @summary Relax response flags checking in sun.security.krb5.KrbKdcRep.check. * @compile -XDignore.symbol.file ForwardableCheck.java - * @run main/othervm ForwardableCheck + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock ForwardableCheck */ import org.ietf.jgss.GSSException; diff --git a/test/sun/security/krb5/auto/GSS.java b/test/sun/security/krb5/auto/GSS.java index 8e782095884bb23167814e09fd76e5310b432ce3..782d162c208c7a0361544829e5c831488a400e56 100644 --- a/test/sun/security/krb5/auto/GSS.java +++ b/test/sun/security/krb5/auto/GSS.java @@ -26,7 +26,7 @@ * @bug 7152176 * @summary More krb5 tests * @compile -XDignore.symbol.file GSS.java - * @run main/othervm GSS + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock GSS */ import sun.security.jgss.GSSUtil; diff --git a/test/sun/security/krb5/auto/GSSUnbound.java b/test/sun/security/krb5/auto/GSSUnbound.java index 74f0e9a91ec74c8b38b6274f3e7dfcd14360e24b..336c57059e0f3c7daba8294c44cfe9a74783827c 100644 --- a/test/sun/security/krb5/auto/GSSUnbound.java +++ b/test/sun/security/krb5/auto/GSSUnbound.java @@ -26,7 +26,7 @@ * @bug 8001104 * @summary Unbound SASL service: the GSSAPI/krb5 mech * @compile -XDignore.symbol.file GSSUnbound.java - * @run main/othervm GSSUnbound + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock GSSUnbound */ import java.security.Security; diff --git a/test/sun/security/krb5/auto/HttpNegotiateServer.java b/test/sun/security/krb5/auto/HttpNegotiateServer.java index 4da7cfa7cd4cf0ac6a07242504a0f8bcb19590fa..0e766bb4b26b3271e61712f2056f5eb7afb90bb2 100644 --- a/test/sun/security/krb5/auto/HttpNegotiateServer.java +++ b/test/sun/security/krb5/auto/HttpNegotiateServer.java @@ -24,7 +24,7 @@ /* * @test * @bug 6578647 6829283 - * @run main/othervm HttpNegotiateServer + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock HttpNegotiateServer * @summary Undefined requesting URL in java.net.Authenticator.getPasswordAuthentication() * @summary HTTP/Negotiate: Authenticator triggered again when user cancels the first one */ diff --git a/test/sun/security/krb5/auto/IgnoreChannelBinding.java b/test/sun/security/krb5/auto/IgnoreChannelBinding.java index e2641a9a4f9d283964540316548ea36b6f3a69c4..2fe23a22ca5aec947cf0d3ddb57a04f34fde5624 100644 --- a/test/sun/security/krb5/auto/IgnoreChannelBinding.java +++ b/test/sun/security/krb5/auto/IgnoreChannelBinding.java @@ -24,7 +24,7 @@ /* * @test * @bug 6851973 - * @run main/othervm IgnoreChannelBinding + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock IgnoreChannelBinding * @summary ignore incoming channel binding if acceptor does not set one */ diff --git a/test/sun/security/krb5/auto/KDC.java b/test/sun/security/krb5/auto/KDC.java index 05a271b05724e2eb93c1500bdc234b8bd1065ea9..2e30a1f12b243618db200295c0b80a7076f75240 100644 --- a/test/sun/security/krb5/auto/KDC.java +++ b/test/sun/security/krb5/auto/KDC.java @@ -206,9 +206,9 @@ public class KDC { SENSITIVE_ACCOUNTS, }; - static { - System.setProperty("sun.net.spi.nameservice.provider.1", "ns,mock"); - } + //static { + // System.setProperty("sun.net.spi.nameservice.provider.1", "ns,mock"); + //} /** * A standalone KDC server. diff --git a/test/sun/security/krb5/auto/KPEquals.java b/test/sun/security/krb5/auto/KPEquals.java index 7a7aaa34f24a9abaf03b9d9388bd56970936ef87..870b7a21675c4d20d16be65e14adcbbf80d47498 100644 --- a/test/sun/security/krb5/auto/KPEquals.java +++ b/test/sun/security/krb5/auto/KPEquals.java @@ -26,7 +26,7 @@ * @bug 8015669 * @summary KerberosPrincipal::equals should ignore name-type * @compile -XDignore.symbol.file KPEquals.java - * @run main/othervm KPEquals + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock KPEquals */ import sun.security.jgss.GSSUtil; diff --git a/test/sun/security/krb5/auto/KerberosHashEqualsTest.java b/test/sun/security/krb5/auto/KerberosHashEqualsTest.java index e7c026dab03a4686577a18a490556a12b46c143a..c666cb4f87ecdc22aeb4a163dbbe0c07a2c8a975 100644 --- a/test/sun/security/krb5/auto/KerberosHashEqualsTest.java +++ b/test/sun/security/krb5/auto/KerberosHashEqualsTest.java @@ -24,7 +24,7 @@ /* * @test * @bug 4641821 - * @run main/othervm KerberosHashEqualsTest + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock KerberosHashEqualsTest * @summary hashCode() and equals() for KerberosKey and KerberosTicket */ diff --git a/test/sun/security/krb5/auto/KeyPermissions.java b/test/sun/security/krb5/auto/KeyPermissions.java index 78f0eafc6c5b2b0d63072a961cedd66d6858c3be..876346e78b49a199f141dae02b5df17ae767640a 100644 --- a/test/sun/security/krb5/auto/KeyPermissions.java +++ b/test/sun/security/krb5/auto/KeyPermissions.java @@ -26,7 +26,7 @@ * @bug 8004488 * @summary wrong permissions checked in krb5 * @compile -XDignore.symbol.file KeyPermissions.java - * @run main/othervm KeyPermissions + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock KeyPermissions */ import java.security.AccessControlException; diff --git a/test/sun/security/krb5/auto/KeyTabCompat.java b/test/sun/security/krb5/auto/KeyTabCompat.java index 00a7f7cd8373ad27cc691476d5f55d6fa9979758..6d1bc8b8d3d6b00465cded21ea332cdc069cb529 100644 --- a/test/sun/security/krb5/auto/KeyTabCompat.java +++ b/test/sun/security/krb5/auto/KeyTabCompat.java @@ -26,7 +26,7 @@ * @bug 6894072 * @bug 8004488 * @compile -XDignore.symbol.file KeyTabCompat.java - * @run main/othervm KeyTabCompat + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock KeyTabCompat * @summary always refresh keytab */ diff --git a/test/sun/security/krb5/auto/KrbTicket.java b/test/sun/security/krb5/auto/KrbTicket.java index daed1cc14ed6d882dc67682bb16cc111280245c2..e822b39d0089fdb10f84829b6717758a81d8cfc9 100644 --- a/test/sun/security/krb5/auto/KrbTicket.java +++ b/test/sun/security/krb5/auto/KrbTicket.java @@ -37,7 +37,7 @@ import javax.security.auth.login.LoginContext; * @test * @bug 6857795 8075299 * @summary Checks Kerberos ticket properties - * @run main/othervm KrbTicket + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock KrbTicket */ public class KrbTicket { diff --git a/test/sun/security/krb5/auto/KvnoNA.java b/test/sun/security/krb5/auto/KvnoNA.java index 2c645ecf3578d8d173c6ce669372fbadd3627121..747a81f14f4c8a27ed16346c9e8c557b588d2f99 100644 --- a/test/sun/security/krb5/auto/KvnoNA.java +++ b/test/sun/security/krb5/auto/KvnoNA.java @@ -25,7 +25,7 @@ * @test * @bug 7197159 * @compile -XDignore.symbol.file KvnoNA.java - * @run main/othervm KvnoNA + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock KvnoNA * @summary accept different kvno if there no match */ diff --git a/test/sun/security/krb5/auto/LifeTimeInSeconds.java b/test/sun/security/krb5/auto/LifeTimeInSeconds.java index 9c518ff6cbb52dc1e5addb3bd7723f221bae3900..9d4c6d7b017f44607e6de1794c62820e95773660 100644 --- a/test/sun/security/krb5/auto/LifeTimeInSeconds.java +++ b/test/sun/security/krb5/auto/LifeTimeInSeconds.java @@ -24,7 +24,7 @@ /* * @test * @bug 6857802 - * @run main/othervm LifeTimeInSeconds + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock LifeTimeInSeconds * @summary GSS getRemainingInitLifetime method returns milliseconds not seconds */ import org.ietf.jgss.GSSCredential; diff --git a/test/sun/security/krb5/auto/LoginModuleOptions.java b/test/sun/security/krb5/auto/LoginModuleOptions.java index 2c77451d74875b63079f8533eecda8a10389369e..a3a4e43b5c66d366cf854c0f1c91ba9ff4845762 100644 --- a/test/sun/security/krb5/auto/LoginModuleOptions.java +++ b/test/sun/security/krb5/auto/LoginModuleOptions.java @@ -24,7 +24,7 @@ /* * @test * @bug 6765491 - * @run main/othervm LoginModuleOptions + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock LoginModuleOptions * @summary Krb5LoginModule a little too restrictive, and the doc is not clear. */ import com.sun.security.auth.module.Krb5LoginModule; diff --git a/test/sun/security/krb5/auto/LoginNoPass.java b/test/sun/security/krb5/auto/LoginNoPass.java index 73de94001aedce40b3eef65f900879247e348894..d67f1b63b52fd21eb6359bb88afe13a9beca29fb 100644 --- a/test/sun/security/krb5/auto/LoginNoPass.java +++ b/test/sun/security/krb5/auto/LoginNoPass.java @@ -26,7 +26,7 @@ * @bug 8028351 * @summary JWS doesn't get authenticated when using kerberos auth proxy * @compile -XDignore.symbol.file LoginNoPass.java - * @run main/othervm LoginNoPass + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock LoginNoPass */ import sun.security.jgss.GSSUtil; diff --git a/test/sun/security/krb5/auto/MSOID2.java b/test/sun/security/krb5/auto/MSOID2.java index e81be6a8a3ddbf3d897b8df10a58fc71b397ad37..948718cd614319cca114a7cbf91a0799925b5ff9 100644 --- a/test/sun/security/krb5/auto/MSOID2.java +++ b/test/sun/security/krb5/auto/MSOID2.java @@ -26,7 +26,7 @@ * @bug 8078439 * @summary SPNEGO auth fails if client proposes MS krb5 OID * @compile -XDignore.symbol.file MSOID2.java - * @run main/othervm MSOID2 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock MSOID2 */ import sun.security.jgss.GSSUtil; diff --git a/test/sun/security/krb5/auto/MaxRetries.java b/test/sun/security/krb5/auto/MaxRetries.java index 2de38177aac1d39a6e4301ea48331c1ce526ba64..de0d17589929758b7ccd496359cf8bea18f1ba96 100644 --- a/test/sun/security/krb5/auto/MaxRetries.java +++ b/test/sun/security/krb5/auto/MaxRetries.java @@ -25,7 +25,7 @@ * @test * @bug 6844193 * @compile -XDignore.symbol.file MaxRetries.java - * @run main/othervm/timeout=300 MaxRetries + * @run main/othervm/timeout=300 -Dsun.net.spi.nameservice.provider.1=ns,mock MaxRetries * @summary support max_retries in krb5.conf */ diff --git a/test/sun/security/krb5/auto/MoreKvno.java b/test/sun/security/krb5/auto/MoreKvno.java index 8abb1e23ffb76a0baf8f267583f5ebe880a188a9..ca67abc92ab730eeeacd4aaa1aea317178882e5f 100644 --- a/test/sun/security/krb5/auto/MoreKvno.java +++ b/test/sun/security/krb5/auto/MoreKvno.java @@ -24,7 +24,7 @@ /* * @test * @bug 6893158 6907425 7197159 - * @run main/othervm MoreKvno + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock MoreKvno * @summary AP_REQ check should use key version number */ diff --git a/test/sun/security/krb5/auto/NewSalt.java b/test/sun/security/krb5/auto/NewSalt.java index 2a0a17fcd9fd1aa52cbed3999e1d747695f705a3..6101ebf89a154d8e206c2cbdde275d16c2b745c4 100644 --- a/test/sun/security/krb5/auto/NewSalt.java +++ b/test/sun/security/krb5/auto/NewSalt.java @@ -25,9 +25,9 @@ * @test * @bug 6960894 * @summary Better AS-REQ creation and processing - * @run main/othervm NewSalt - * @run main/othervm -Dnopreauth NewSalt - * @run main/othervm -Donlyonepreauth NewSalt + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock NewSalt + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dnopreauth NewSalt + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Donlyonepreauth NewSalt */ import sun.security.jgss.GSSUtil; diff --git a/test/sun/security/krb5/auto/NoAddresses.java b/test/sun/security/krb5/auto/NoAddresses.java index 04c5b71e52af7aa79dd648840e39cb611fb26d62..7a8cc7b51ce1dd8ed4c5a8ee9e7543b1d2c16a5b 100644 --- a/test/sun/security/krb5/auto/NoAddresses.java +++ b/test/sun/security/krb5/auto/NoAddresses.java @@ -24,9 +24,9 @@ /* * @test * @bug 7032354 - * @run main/othervm NoAddresses 1 - * @run main/othervm NoAddresses 2 - * @run main/othervm/fail NoAddresses 3 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock NoAddresses 1 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock NoAddresses 2 + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock NoAddresses 3 * @summary no-addresses should not be used on acceptor side */ diff --git a/test/sun/security/krb5/auto/NoInitNoKeytab.java b/test/sun/security/krb5/auto/NoInitNoKeytab.java index cde2ec6bbe49c27d1d86845783e33d4644c17676..7544846c9176da166c99602af96f281735f01897 100644 --- a/test/sun/security/krb5/auto/NoInitNoKeytab.java +++ b/test/sun/security/krb5/auto/NoInitNoKeytab.java @@ -26,7 +26,7 @@ * @bug 7089889 * @summary Krb5LoginModule.login() throws an exception if used without a keytab * @compile -XDignore.symbol.file NoInitNoKeytab.java - * @run main/othervm NoInitNoKeytab + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock NoInitNoKeytab */ import java.io.FileOutputStream; diff --git a/test/sun/security/krb5/auto/NonMutualSpnego.java b/test/sun/security/krb5/auto/NonMutualSpnego.java index 304dca1be89fdb7f9cdd8ff159914d78a802b7be..cd9d9bd74e6a67e976e812d353eb746920cbeb81 100644 --- a/test/sun/security/krb5/auto/NonMutualSpnego.java +++ b/test/sun/security/krb5/auto/NonMutualSpnego.java @@ -24,7 +24,7 @@ /* * @test * @bug 6733095 - * @run main/othervm NonMutualSpnego + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock NonMutualSpnego * @summary Failure when SPNEGO request non-Mutual */ diff --git a/test/sun/security/krb5/auto/NoneReplayCacheTest.java b/test/sun/security/krb5/auto/NoneReplayCacheTest.java index 2bb59a2990f1036935bd7b093255b7d8470af54c..9168b5d19febc9c3b42ae58fe241a36439a5dc5c 100644 --- a/test/sun/security/krb5/auto/NoneReplayCacheTest.java +++ b/test/sun/security/krb5/auto/NoneReplayCacheTest.java @@ -24,7 +24,7 @@ /* * @test * @bug 8001326 - * @run main/othervm NoneReplayCacheTest + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock NoneReplayCacheTest * @summary the replaycache type none cannot stop an authenticator replay, * but it can stop a message replay when s.s.k.acceptor.subkey is true. * You should not really use none in production environment. This test merely diff --git a/test/sun/security/krb5/auto/OkAsDelegate.java b/test/sun/security/krb5/auto/OkAsDelegate.java index d66e2421b82aacee2947ddd8c1acc53c4915efca..fe4868af4288a546617b47953ff8cf1ad90a2432 100644 --- a/test/sun/security/krb5/auto/OkAsDelegate.java +++ b/test/sun/security/krb5/auto/OkAsDelegate.java @@ -24,27 +24,27 @@ /* * @test * @bug 6853328 7172701 - * @run main/othervm OkAsDelegate false true true false false false + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock OkAsDelegate false true true false false false * FORWARDABLE ticket not allowed, always fail - * @run main/othervm OkAsDelegate true false false false false false + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock OkAsDelegate true false false false false false * Service ticket no OK-AS-DELEGATE. Request nothing, gain nothing - * @run main/othervm OkAsDelegate true false true false false false + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock OkAsDelegate true false true false false false * Service ticket no OK-AS-DELEGATE. Request deleg policy, gain nothing - * @run main/othervm OkAsDelegate true true false true false true + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock OkAsDelegate true true false true false true * Service ticket no OK-AS-DELEGATE. Request deleg, granted - * @run main/othervm OkAsDelegate true true true true false true + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock OkAsDelegate true true true true false true * Service ticket no OK-AS-DELEGATE. Request deleg and deleg policy, granted, with info not by policy - * @run main/othervm -Dtest.kdc.policy.ok-as-delegate OkAsDelegate true false true true true true + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dtest.kdc.policy.ok-as-delegate OkAsDelegate true false true true true true * Service ticket has OK-AS-DELEGATE. Request deleg policy, granted - * @run main/othervm -Dtest.kdc.policy.ok-as-delegate OkAsDelegate true true true true true true + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dtest.kdc.policy.ok-as-delegate OkAsDelegate true true true true true true * Service ticket has OK-AS-DELEGATE. granted, with info by policy - * @run main/othervm -Dtest.spnego OkAsDelegate false true true false false false - * @run main/othervm -Dtest.spnego OkAsDelegate true false false false false false - * @run main/othervm -Dtest.spnego OkAsDelegate true false true false false false - * @run main/othervm -Dtest.spnego OkAsDelegate true true false true false true - * @run main/othervm -Dtest.spnego OkAsDelegate true true true true false true - * @run main/othervm -Dtest.spnego -Dtest.kdc.policy.ok-as-delegate OkAsDelegate true false true true true true - * @run main/othervm -Dtest.spnego -Dtest.kdc.policy.ok-as-delegate OkAsDelegate true true true true true true + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dtest.spnego OkAsDelegate false true true false false false + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dtest.spnego OkAsDelegate true false false false false false + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dtest.spnego OkAsDelegate true false true false false false + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dtest.spnego OkAsDelegate true true false true false true + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dtest.spnego OkAsDelegate true true true true false true + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dtest.spnego -Dtest.kdc.policy.ok-as-delegate OkAsDelegate true false true true true true + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dtest.spnego -Dtest.kdc.policy.ok-as-delegate OkAsDelegate true true true true true true * @summary Support OK-AS-DELEGATE flag */ import com.sun.security.jgss.ExtendedGSSContext; diff --git a/test/sun/security/krb5/auto/OkAsDelegateXRealm.java b/test/sun/security/krb5/auto/OkAsDelegateXRealm.java index 4607619ec319d6521c408b16c51e87e11122e1bb..7d9176287fc6232750c58137c6312d4ff2eed398 100644 --- a/test/sun/security/krb5/auto/OkAsDelegateXRealm.java +++ b/test/sun/security/krb5/auto/OkAsDelegateXRealm.java @@ -24,13 +24,13 @@ /* * @test * @bug 6853328 7172701 - * @run main/othervm OkAsDelegateXRealm false + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock OkAsDelegateXRealm false * KDC no OK-AS-DELEGATE, fail - * @run main/othervm -Dtest.kdc.policy.ok-as-delegate OkAsDelegateXRealm true + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dtest.kdc.policy.ok-as-delegate OkAsDelegateXRealm true * KDC set OK-AS-DELEGATE for all, succeed - * @run main/othervm -Dtest.kdc.policy.ok-as-delegate=host/host.r3.local OkAsDelegateXRealm false + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dtest.kdc.policy.ok-as-delegate=host/host.r3.local OkAsDelegateXRealm false * KDC set OK-AS-DELEGATE for host/host.r3.local only, fail - * @run main/othervm -Dtest.kdc.policy.ok-as-delegate=host/host.r3.local,krbtgt/R2,krbtgt/R3 OkAsDelegateXRealm true + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dtest.kdc.policy.ok-as-delegate=host/host.r3.local,krbtgt/R2,krbtgt/R3 OkAsDelegateXRealm true * KDC set OK-AS-DELEGATE for all three, succeed * @summary Support OK-AS-DELEGATE flag */ diff --git a/test/sun/security/krb5/auto/OnlyDesLogin.java b/test/sun/security/krb5/auto/OnlyDesLogin.java index c4b03d166f8ae10ace37eae64e6e5f5c01c64ec9..455a8370dece069d39f430415a74b7de3e443dc5 100644 --- a/test/sun/security/krb5/auto/OnlyDesLogin.java +++ b/test/sun/security/krb5/auto/OnlyDesLogin.java @@ -26,7 +26,7 @@ * @bug 8014310 * @summary JAAS/Krb5LoginModule using des encytypes failure with NPE after JDK-8012679 * @compile -XDignore.symbol.file OnlyDesLogin.java - * @run main/othervm OnlyDesLogin + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock OnlyDesLogin */ import sun.security.krb5.Config; diff --git a/test/sun/security/krb5/auto/PrincipalNameEquals.java b/test/sun/security/krb5/auto/PrincipalNameEquals.java index c4ae6b9aa9df2557acd2f9f100d6db90b34cafd9..08d6ad8b47cbeff4c87e8067983dc9ff7c595748 100644 --- a/test/sun/security/krb5/auto/PrincipalNameEquals.java +++ b/test/sun/security/krb5/auto/PrincipalNameEquals.java @@ -26,7 +26,7 @@ * @bug 7061379 * @summary [Kerberos] Cross-realm authentication fails, due to nameType problem * @compile -XDignore.symbol.file PrincipalNameEquals.java - * @run main/othervm PrincipalNameEquals + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock PrincipalNameEquals */ import sun.security.jgss.GSSUtil; diff --git a/test/sun/security/krb5/auto/RRC.java b/test/sun/security/krb5/auto/RRC.java index ade12a40abe5da7bb1c9205041492f5ef31fa344..3572bbcab682016382721ffb0d1fa0f36e7c6ae6 100644 --- a/test/sun/security/krb5/auto/RRC.java +++ b/test/sun/security/krb5/auto/RRC.java @@ -26,7 +26,7 @@ * @bug 7077640 * @summary gss wrap for cfx doesn't handle rrc != 0 * @compile -XDignore.symbol.file RRC.java - * @run main/othervm RRC + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock RRC */ import java.util.Arrays; diff --git a/test/sun/security/krb5/auto/RefreshKrb5Config.java b/test/sun/security/krb5/auto/RefreshKrb5Config.java index c32258f268c6070be8a61b6c3c4c6a5a6d843e3f..9699a276cd1b3a847ed3840e87687a274d1df09e 100644 --- a/test/sun/security/krb5/auto/RefreshKrb5Config.java +++ b/test/sun/security/krb5/auto/RefreshKrb5Config.java @@ -34,7 +34,7 @@ import javax.security.auth.login.LoginException; * @bug 4745056 8075297 * @summary Checks if refreshKrb5Config is set to true for Krb5LoginModule, * then configuration will be refreshed before login() method is called - * @run main/othervm RefreshKrb5Config + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock RefreshKrb5Config */ public class RefreshKrb5Config { diff --git a/test/sun/security/krb5/auto/ReplayCacheTest.java b/test/sun/security/krb5/auto/ReplayCacheTest.java index 79a4da79f2d580b97cd8430a226dc582d6f5a517..6c81c02906c22fa8711fc57d5871919af3564b4d 100644 --- a/test/sun/security/krb5/auto/ReplayCacheTest.java +++ b/test/sun/security/krb5/auto/ReplayCacheTest.java @@ -24,8 +24,8 @@ /* * @test * @bug 7118809 8001326 - * @run main/othervm ReplayCacheTest jvm - * @run main/othervm ReplayCacheTest dfl + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock ReplayCacheTest jvm + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock ReplayCacheTest dfl * @summary rcache deadlock */ diff --git a/test/sun/security/krb5/auto/ReplayCacheTestProc.java b/test/sun/security/krb5/auto/ReplayCacheTestProc.java index 25d685435579a6c3c321f7592ee9c2330b8d7c6c..6413e155b73931f76d66537901b42933a5886e3a 100644 --- a/test/sun/security/krb5/auto/ReplayCacheTestProc.java +++ b/test/sun/security/krb5/auto/ReplayCacheTestProc.java @@ -27,7 +27,7 @@ * @summary More krb5 tests * @library ../../../../java/security/testlibrary/ * @compile -XDignore.symbol.file ReplayCacheTestProc.java - * @run main/othervm/timeout=100 ReplayCacheTestProc + * @run main/othervm/timeout=100 -Dsun.net.spi.nameservice.provider.1=ns,mock ReplayCacheTestProc */ import java.io.*; @@ -277,6 +277,7 @@ public class ReplayCacheTestProc { .prop("sun.security.jgss.native", "true") .prop("javax.security.auth.useSubjectCredsOnly", "false") .prop("sun.security.nativegss.debug", "true") + .prop("sun.net.spi.nameservice.provider.1", "ns,mock") .debug("N"+i) .start(); } @@ -287,6 +288,7 @@ public class ReplayCacheTestProc { .args("S"+i) .prop("sun.security.krb5.rcache", "dfl") .prop("java.io.tmpdir", cwd) + .prop("sun.net.spi.nameservice.provider.1", "ns,mock") .start(); } // generates hash of authenticator inside ap-req inside initsectoken diff --git a/test/sun/security/krb5/auto/S4U2proxy.java b/test/sun/security/krb5/auto/S4U2proxy.java index 10e565279f0115f09d94ba56a1ddaabab967490e..cd7a3cd00295afa143c2402292893565f26bf86b 100644 --- a/test/sun/security/krb5/auto/S4U2proxy.java +++ b/test/sun/security/krb5/auto/S4U2proxy.java @@ -26,8 +26,8 @@ * @bug 6355584 8044215 * @summary Introduce constrained Kerberos delegation * @compile -XDignore.symbol.file S4U2proxy.java - * @run main/othervm S4U2proxy krb5 - * @run main/othervm S4U2proxy spnego + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock S4U2proxy krb5 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock S4U2proxy spnego */ import java.util.Arrays; diff --git a/test/sun/security/krb5/auto/S4U2proxyGSS.java b/test/sun/security/krb5/auto/S4U2proxyGSS.java index f2f0b305e0507682370ab90e62326e84047ef84b..d0006b6dea6d3d5b8600f2f09190623d65b0eccd 100644 --- a/test/sun/security/krb5/auto/S4U2proxyGSS.java +++ b/test/sun/security/krb5/auto/S4U2proxyGSS.java @@ -26,8 +26,8 @@ * @bug 6355584 * @summary Introduce constrained Kerberos delegation * @compile -XDignore.symbol.file S4U2proxyGSS.java - * @run main/othervm -Djavax.security.auth.useSubjectCredsOnly=false S4U2proxyGSS krb5 - * @run main/othervm -Djavax.security.auth.useSubjectCredsOnly=false S4U2proxyGSS spnego + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Djavax.security.auth.useSubjectCredsOnly=false S4U2proxyGSS krb5 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Djavax.security.auth.useSubjectCredsOnly=false S4U2proxyGSS spnego */ import java.io.File; diff --git a/test/sun/security/krb5/auto/S4U2self.java b/test/sun/security/krb5/auto/S4U2self.java index a6c4b21c1923f1bd696ac0938ce6dd50dd026af2..bfbf0dcb0306a31b1e03060517046db074a69178 100644 --- a/test/sun/security/krb5/auto/S4U2self.java +++ b/test/sun/security/krb5/auto/S4U2self.java @@ -26,13 +26,13 @@ * @bug 6355584 * @summary Introduce constrained Kerberos delegation * @compile -XDignore.symbol.file S4U2self.java - * @run main/othervm -Dsun.security.krb5.debug=false S4U2self krb5 0 - * @run main/othervm/fail -Dsun.security.krb5.debug=false S4U2self krb5 1 - * @run main/othervm/fail -Dsun.security.krb5.debug=false S4U2self krb5 2 - * @run main/othervm/fail -Dsun.security.krb5.debug=false S4U2self krb5 3 - * @run main/othervm/fail -Dsun.security.krb5.debug=false S4U2self krb5 4 - * @run main/othervm/fail -Dsun.security.krb5.debug=false S4U2self krb5 5 - * @run main/othervm -Dsun.security.krb5.debug=false S4U2self spnego + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dsun.security.krb5.debug=false S4U2self krb5 0 + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock -Dsun.security.krb5.debug=false S4U2self krb5 1 + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock -Dsun.security.krb5.debug=false S4U2self krb5 2 + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock -Dsun.security.krb5.debug=false S4U2self krb5 3 + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock -Dsun.security.krb5.debug=false S4U2self krb5 4 + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock -Dsun.security.krb5.debug=false S4U2self krb5 5 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dsun.security.krb5.debug=false S4U2self spnego */ import java.util.Arrays; diff --git a/test/sun/security/krb5/auto/S4U2selfAsServer.java b/test/sun/security/krb5/auto/S4U2selfAsServer.java index 467129c16e351b3cf2365e437ccd3ab95f508f01..33c31175e013cb7fa41cbe9a2d6688552f1a7eaa 100644 --- a/test/sun/security/krb5/auto/S4U2selfAsServer.java +++ b/test/sun/security/krb5/auto/S4U2selfAsServer.java @@ -26,8 +26,8 @@ * @bug 6355584 * @summary Introduce constrained Kerberos delegation * @compile -XDignore.symbol.file S4U2selfAsServer.java - * @run main/othervm S4U2selfAsServer krb5 - * @run main/othervm S4U2selfAsServer spnego + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock S4U2selfAsServer krb5 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock S4U2selfAsServer spnego */ import java.util.Arrays; diff --git a/test/sun/security/krb5/auto/S4U2selfAsServerGSS.java b/test/sun/security/krb5/auto/S4U2selfAsServerGSS.java index 0ff2b7bb53d36d2abc8600a4171d5eb5ed433b5c..47e52abaa4f2ebcd1b2bd265518f79eab7ba510c 100644 --- a/test/sun/security/krb5/auto/S4U2selfAsServerGSS.java +++ b/test/sun/security/krb5/auto/S4U2selfAsServerGSS.java @@ -26,8 +26,8 @@ * @bug 6355584 * @summary Introduce constrained Kerberos delegation * @compile -XDignore.symbol.file S4U2selfAsServerGSS.java - * @run main/othervm -Djavax.security.auth.useSubjectCredsOnly=false S4U2selfAsServerGSS krb5 - * @run main/othervm -Djavax.security.auth.useSubjectCredsOnly=false S4U2selfAsServerGSS spnego + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Djavax.security.auth.useSubjectCredsOnly=false S4U2selfAsServerGSS krb5 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Djavax.security.auth.useSubjectCredsOnly=false S4U2selfAsServerGSS spnego */ import java.io.File; diff --git a/test/sun/security/krb5/auto/S4U2selfGSS.java b/test/sun/security/krb5/auto/S4U2selfGSS.java index f060c787ffb8ad3d4f8491a7b878bbbbcd9ffa33..40c93fce90597dc76f71eb8840a9d1e1ba08c0a1 100644 --- a/test/sun/security/krb5/auto/S4U2selfGSS.java +++ b/test/sun/security/krb5/auto/S4U2selfGSS.java @@ -26,8 +26,8 @@ * @bug 6355584 * @summary Introduce constrained Kerberos delegation * @compile -XDignore.symbol.file S4U2selfGSS.java - * @run main/othervm -Dsun.security.krb5.debug=false S4U2selfGSS krb5 - * @run main/othervm -Dsun.security.krb5.debug=false S4U2selfGSS spnego + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dsun.security.krb5.debug=false S4U2selfGSS krb5 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dsun.security.krb5.debug=false S4U2selfGSS spnego */ import java.util.Arrays; diff --git a/test/sun/security/krb5/auto/SPNEGO.java b/test/sun/security/krb5/auto/SPNEGO.java index 250a942f0d4b2f25870e7277898a00c10c710bfc..85ff5aac24b0b16c961e3366085ad19364e25f04 100644 --- a/test/sun/security/krb5/auto/SPNEGO.java +++ b/test/sun/security/krb5/auto/SPNEGO.java @@ -26,7 +26,7 @@ * @bug 7040151 * @summary SPNEGO GSS code does not parse tokens in accordance to RFC 2478 * @compile -XDignore.symbol.file SPNEGO.java - * @run main/othervm SPNEGO + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SPNEGO */ import sun.security.jgss.GSSUtil; diff --git a/test/sun/security/krb5/auto/SSL.java b/test/sun/security/krb5/auto/SSL.java index 5605df12c7cd1cddcf854d80cd2709b0d0bd5d18..5d6bdb9f8a879f5c2fd0809e287f57ce08f1ab6a 100644 --- a/test/sun/security/krb5/auto/SSL.java +++ b/test/sun/security/krb5/auto/SSL.java @@ -26,17 +26,17 @@ * @bug 6894643 6913636 8005523 8025123 * @summary Test JSSE Kerberos ciphersuite - * @run main/othervm SSL TLS_KRB5_WITH_RC4_128_SHA - * @run main/othervm SSL TLS_KRB5_WITH_RC4_128_SHA unbound - * @run main/othervm SSL TLS_KRB5_WITH_RC4_128_SHA unbound sni - * @run main/othervm SSL TLS_KRB5_WITH_3DES_EDE_CBC_SHA - * @run main/othervm SSL TLS_KRB5_WITH_3DES_EDE_CBC_MD5 - * @run main/othervm SSL TLS_KRB5_WITH_DES_CBC_SHA - * @run main/othervm SSL TLS_KRB5_WITH_DES_CBC_MD5 - * @run main/othervm SSL TLS_KRB5_EXPORT_WITH_RC4_40_SHA - * @run main/othervm SSL TLS_KRB5_EXPORT_WITH_RC4_40_MD5 - * @run main/othervm SSL TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA - * @run main/othervm SSL TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SSL TLS_KRB5_WITH_RC4_128_SHA + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SSL TLS_KRB5_WITH_RC4_128_SHA unbound + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SSL TLS_KRB5_WITH_RC4_128_SHA unbound sni + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SSL TLS_KRB5_WITH_3DES_EDE_CBC_SHA + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SSL TLS_KRB5_WITH_3DES_EDE_CBC_MD5 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SSL TLS_KRB5_WITH_DES_CBC_SHA + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SSL TLS_KRB5_WITH_DES_CBC_MD5 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SSL TLS_KRB5_EXPORT_WITH_RC4_40_SHA + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SSL TLS_KRB5_EXPORT_WITH_RC4_40_MD5 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SSL TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SSL TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 */ import java.io.*; import java.security.Permission; diff --git a/test/sun/security/krb5/auto/SaslBasic.java b/test/sun/security/krb5/auto/SaslBasic.java index ef38ab3185f4884fb4d1188006532b70119d1899..175e4b463995279a3edd0007a4971a20eb41d9f6 100644 --- a/test/sun/security/krb5/auto/SaslBasic.java +++ b/test/sun/security/krb5/auto/SaslBasic.java @@ -26,8 +26,8 @@ * @bug 7110803 * @summary SASL service for multiple hostnames * @compile -XDignore.symbol.file SaslBasic.java - * @run main/othervm SaslBasic bound - * @run main/othervm SaslBasic unbound + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SaslBasic bound + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SaslBasic unbound */ import java.io.IOException; import java.util.Arrays; diff --git a/test/sun/security/krb5/auto/SaslGSS.java b/test/sun/security/krb5/auto/SaslGSS.java index ec5419353088bb0e17f45cfa69293b97667f256c..d21cfebb19bd63d3892921757ec56ac0d56ef94b 100644 --- a/test/sun/security/krb5/auto/SaslGSS.java +++ b/test/sun/security/krb5/auto/SaslGSS.java @@ -27,7 +27,7 @@ * @summary SASL: auth-conf negotiated, but unencrypted data is accepted, * reset to unencrypt * @compile -XDignore.symbol.file SaslGSS.java - * @run main/othervm SaslGSS + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SaslGSS */ import javax.security.auth.callback.Callback; diff --git a/test/sun/security/krb5/auto/SaslUnbound.java b/test/sun/security/krb5/auto/SaslUnbound.java index 797d66b94be4a0f3da6c565bc5a648bb2698d059..32dc9d30d4d10f511bb4f6c6f5ccc70354cfec17 100644 --- a/test/sun/security/krb5/auto/SaslUnbound.java +++ b/test/sun/security/krb5/auto/SaslUnbound.java @@ -26,11 +26,11 @@ * @bug 8001104 * @summary Unbound SASL service: the GSSAPI/krb5 mech * @compile -XDignore.symbol.file SaslUnbound.java - * @run main/othervm SaslUnbound 0 - * @run main/othervm/fail SaslUnbound 1 - * @run main/othervm/fail SaslUnbound 2 - * @run main/othervm/fail SaslUnbound 3 - * @run main/othervm/fail SaslUnbound 4 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SaslUnbound 0 + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock SaslUnbound 1 + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock SaslUnbound 2 + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock SaslUnbound 3 + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock SaslUnbound 4 */ import java.io.IOException; import java.util.Arrays; diff --git a/test/sun/security/krb5/auto/SpnegoLifeTime.java b/test/sun/security/krb5/auto/SpnegoLifeTime.java index 906cfbee786c7df7408e5c9d1193b75d3c22ce40..554956ac3ef69cc25bc57cffed06968bc0beae3e 100644 --- a/test/sun/security/krb5/auto/SpnegoLifeTime.java +++ b/test/sun/security/krb5/auto/SpnegoLifeTime.java @@ -26,7 +26,7 @@ * @bug 8000653 * @summary SPNEGO tests fail at context.getDelegCred().getRemainingInitLifetime(mechOid) * @compile -XDignore.symbol.file SpnegoLifeTime.java - * @run main/othervm SpnegoLifeTime + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SpnegoLifeTime */ import org.ietf.jgss.Oid; diff --git a/test/sun/security/krb5/auto/SpnegoReqFlags.java b/test/sun/security/krb5/auto/SpnegoReqFlags.java index 62c55048d1f27273e5f52b6ed3908dbaa73f2e91..778fab9fc96485c0256909d10ec64f17090051d6 100644 --- a/test/sun/security/krb5/auto/SpnegoReqFlags.java +++ b/test/sun/security/krb5/auto/SpnegoReqFlags.java @@ -24,7 +24,7 @@ /* * @test * @bug 6815182 - * @run main/othervm SpnegoReqFlags + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock SpnegoReqFlags * @summary GSSAPI/SPNEGO does not work with server using MIT Kerberos library */ diff --git a/test/sun/security/krb5/auto/TcpTimeout.java b/test/sun/security/krb5/auto/TcpTimeout.java index 45699fbe5addfd8ee2b50c571a1ee4641db4eb48..14cacc9d1377fdd40d2d5ed4efe7e86e289ca56c 100644 --- a/test/sun/security/krb5/auto/TcpTimeout.java +++ b/test/sun/security/krb5/auto/TcpTimeout.java @@ -25,7 +25,7 @@ * @test * @bug 6952519 * @compile -XDignore.symbol.file TcpTimeout.java - * @run main/othervm TcpTimeout + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock TcpTimeout * @summary kdc_timeout is not being honoured when using TCP */ diff --git a/test/sun/security/krb5/auto/Test5653.java b/test/sun/security/krb5/auto/Test5653.java index 4384b87ee0b4a26d98412161ba40195e0edd67c3..afa0e97e5113c4fbd5f0b5d214d998b9062b1bf3 100644 --- a/test/sun/security/krb5/auto/Test5653.java +++ b/test/sun/security/krb5/auto/Test5653.java @@ -24,7 +24,7 @@ /* * @test * @bug 6895424 - * @run main/othervm Test5653 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock Test5653 * @summary RFC 5653 */ diff --git a/test/sun/security/krb5/auto/TicketSName.java b/test/sun/security/krb5/auto/TicketSName.java index 458d478af142bb3bbd665f9aaa341170803ec4d1..6e11efce5e81796c4c3284c5752231f6719f21c1 100644 --- a/test/sun/security/krb5/auto/TicketSName.java +++ b/test/sun/security/krb5/auto/TicketSName.java @@ -26,7 +26,7 @@ * @bug 8178794 * @summary krb5 client should ignore sname in incoming tickets * @compile -XDignore.symbol.file TicketSName.java - * @run main/othervm -Dtest.kdc.diff.sname TicketSName + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Dtest.kdc.diff.sname TicketSName */ import sun.security.jgss.GSSUtil; diff --git a/test/sun/security/krb5/auto/TwoOrThree.java b/test/sun/security/krb5/auto/TwoOrThree.java index 5af545be4a1872111b5443c9f45ea063a6ac42d2..e990417a584e39183bc1c8ca8ca197140c260842 100644 --- a/test/sun/security/krb5/auto/TwoOrThree.java +++ b/test/sun/security/krb5/auto/TwoOrThree.java @@ -26,11 +26,11 @@ * @bug 8005447 * @summary default principal can act as anyone * @compile -XDignore.symbol.file TwoOrThree.java - * @run main/othervm TwoOrThree first first - * @run main/othervm/fail TwoOrThree first second - * @run main/othervm TwoOrThree - first - * @run main/othervm TwoOrThree - second - * @run main/othervm/fail TwoOrThree - third + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock TwoOrThree first first + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock TwoOrThree first second + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock TwoOrThree - first + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock TwoOrThree - second + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock TwoOrThree - third */ import java.nio.file.Files; diff --git a/test/sun/security/krb5/auto/TwoPrinces.java b/test/sun/security/krb5/auto/TwoPrinces.java index 30f16e96a2558f16e57bb3b70349a0aa147b172e..13fe41adc54596ce57ec57e34e93a95e0ef71d65 100644 --- a/test/sun/security/krb5/auto/TwoPrinces.java +++ b/test/sun/security/krb5/auto/TwoPrinces.java @@ -25,7 +25,7 @@ * @test * @bug 6894072 * @compile -XDignore.symbol.file TwoPrinces.java - * @run main/othervm TwoPrinces + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock TwoPrinces * @summary always refresh keytab */ diff --git a/test/sun/security/krb5/auto/TwoTab.java b/test/sun/security/krb5/auto/TwoTab.java index dd2cf96a8a4856a46705b6a97f824b5e25d3fd5f..6c88d9eb0ee43f602fc0add40d550f22fb4f0dd6 100644 --- a/test/sun/security/krb5/auto/TwoTab.java +++ b/test/sun/security/krb5/auto/TwoTab.java @@ -26,7 +26,7 @@ * @bug 7152176 * @summary More krb5 tests * @compile -XDignore.symbol.file TwoTab.java - * @run main/othervm TwoTab + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock TwoTab */ import java.io.File; diff --git a/test/sun/security/krb5/auto/UdpTcp.java b/test/sun/security/krb5/auto/UdpTcp.java index ae54b7935274d4baf0d7429e54936dedbebfad31..a8d4f23cb3775cfe62b717fec0d4e3f32a52d8ab 100644 --- a/test/sun/security/krb5/auto/UdpTcp.java +++ b/test/sun/security/krb5/auto/UdpTcp.java @@ -24,8 +24,8 @@ /* * @test * @bug 4966382 8039132 - * @run main/othervm UdpTcp UDP - * @run main/othervm UdpTcp TCP + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock UdpTcp UDP + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock UdpTcp TCP * @summary udp or tcp */ diff --git a/test/sun/security/krb5/auto/UnboundSSL.java b/test/sun/security/krb5/auto/UnboundSSL.java index 8ff73aad8dc6e1213a0debee52893a4d3e6af1a7..063729b464c9d7e5c0c0b9c529834990f384dbb9 100644 --- a/test/sun/security/krb5/auto/UnboundSSL.java +++ b/test/sun/security/krb5/auto/UnboundSSL.java @@ -34,9 +34,9 @@ import javax.security.auth.login.LoginException; * @bug 8025123 * @summary Checks if an unbound server can handle connections * only for allowed service principals - * @run main/othervm/java.security.policy=unbound.ssl.policy UnboundSSL + * @run main/othervm/java.security.policy=unbound.ssl.policy -Dsun.net.spi.nameservice.provider.1=ns,mock UnboundSSL * unbound.ssl.jaas.conf server_star - * @run main/othervm/java.security.policy=unbound.ssl.policy UnboundSSL + * @run main/othervm/java.security.policy=unbound.ssl.policy -Dsun.net.spi.nameservice.provider.1=ns,mock UnboundSSL * unbound.ssl.jaas.conf server_multiple_principals */ public class UnboundSSL { diff --git a/test/sun/security/krb5/auto/UnboundSSLMultipleKeys.java b/test/sun/security/krb5/auto/UnboundSSLMultipleKeys.java index aa1ea2b38ced68125bdbb06c6b58dc10d68baee4..a3c209d0ec68cffbc93cb63969edbdd809a661d3 100644 --- a/test/sun/security/krb5/auto/UnboundSSLMultipleKeys.java +++ b/test/sun/security/krb5/auto/UnboundSSLMultipleKeys.java @@ -33,9 +33,9 @@ import javax.security.auth.login.LoginException; * @test * @bug 8025123 * @summary Checks if an unbound server pick up a correct key from keytab - * @run main/othervm UnboundSSLMultipleKeys + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock UnboundSSLMultipleKeys * unbound.ssl.jaas.conf server_star - * @run main/othervm UnboundSSLMultipleKeys + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock UnboundSSLMultipleKeys * unbound.ssl.jaas.conf server_multiple_principals */ public class UnboundSSLMultipleKeys { diff --git a/test/sun/security/krb5/auto/UnboundSSLPrincipalProperty.java b/test/sun/security/krb5/auto/UnboundSSLPrincipalProperty.java index ab8549eb87c45d8620e9933a6050d9e6f3822d50..9f7849300332cbec7d9ac8de59660b36f3dc4d6c 100644 --- a/test/sun/security/krb5/auto/UnboundSSLPrincipalProperty.java +++ b/test/sun/security/krb5/auto/UnboundSSLPrincipalProperty.java @@ -33,9 +33,9 @@ import javax.security.auth.login.LoginException; * @bug 8025123 * @summary Checks if an unbound server uses a service principal * from sun.security.krb5.principal system property if specified - * @run main/othervm UnboundSSLPrincipalProperty + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock UnboundSSLPrincipalProperty * unbound.ssl.jaas.conf server_star - * @run main/othervm UnboundSSLPrincipalProperty + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock UnboundSSLPrincipalProperty * unbound.ssl.jaas.conf server_multiple_principals */ public class UnboundSSLPrincipalProperty { diff --git a/test/sun/security/krb5/auto/UnboundService.java b/test/sun/security/krb5/auto/UnboundService.java index 1327f78c995cf08128d1763601057dab294fd22c..a15335e9c99a1eab958eccb35daa6c84fdb95f71 100644 --- a/test/sun/security/krb5/auto/UnboundService.java +++ b/test/sun/security/krb5/auto/UnboundService.java @@ -26,14 +26,14 @@ * @bug 8001104 * @summary Unbound SASL service: the GSSAPI/krb5 mech * @compile -XDignore.symbol.file UnboundService.java - * @run main/othervm UnboundService null null - * @run main/othervm UnboundService server/host.rabbit.hole null - * @run main/othervm UnboundService server/host.rabbit.hole@RABBIT.HOLE null - * @run main/othervm/fail UnboundService backend/host.rabbit.hole null - * @run main/othervm UnboundService null server@host.rabbit.hole - * @run main/othervm UnboundService server/host.rabbit.hole server@host.rabbit.hole - * @run main/othervm UnboundService server/host.rabbit.hole@RABBIT.HOLE server@host.rabbit.hole - * @run main/othervm/fail UnboundService backend/host.rabbit.hole server@host.rabbit.hole + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock UnboundService null null + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock UnboundService server/host.rabbit.hole null + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock UnboundService server/host.rabbit.hole@RABBIT.HOLE null + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock UnboundService backend/host.rabbit.hole null + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock UnboundService null server@host.rabbit.hole + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock UnboundService server/host.rabbit.hole server@host.rabbit.hole + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock UnboundService server/host.rabbit.hole@RABBIT.HOLE server@host.rabbit.hole + * @run main/othervm/fail -Dsun.net.spi.nameservice.provider.1=ns,mock UnboundService backend/host.rabbit.hole server@host.rabbit.hole */ import java.io.File; diff --git a/test/sun/security/krb5/auto/UseCacheAndStoreKey.java b/test/sun/security/krb5/auto/UseCacheAndStoreKey.java index 3769643e09adf7856aac2a2cadd06484fd5180ff..82f94356ac4fd57e3442f9212713f66334fe95fa 100644 --- a/test/sun/security/krb5/auto/UseCacheAndStoreKey.java +++ b/test/sun/security/krb5/auto/UseCacheAndStoreKey.java @@ -27,7 +27,7 @@ * @summary Krb5LoginModule shows NPE when both useTicketCache and storeKey * are set to true * @compile -XDignore.symbol.file UseCacheAndStoreKey.java - * @run main/othervm UseCacheAndStoreKey + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock UseCacheAndStoreKey */ import java.io.FileOutputStream; diff --git a/test/sun/security/krb5/auto/W83.java b/test/sun/security/krb5/auto/W83.java index dea4e765e405ef1e2ba93f8b08396ea505e69352..9b30db75c19b707c6063cd2e0fa57d4016bf9fa8 100644 --- a/test/sun/security/krb5/auto/W83.java +++ b/test/sun/security/krb5/auto/W83.java @@ -26,8 +26,8 @@ * @bug 6932525 6951366 6959292 * @summary kerberos login failure on win2008 with AD set to win2000 compat mode * and cannot login if session key and preauth does not use the same etype - * @run main/othervm -D6932525 W83 - * @run main/othervm -D6959292 W83 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -D6932525 W83 + * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -D6959292 W83 */ import com.sun.security.auth.module.Krb5LoginModule; import java.io.File;