/* * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions.
*/
/* * @test * @bug 8009977 8186884 8194486 8201627 * @summary A test to launch multiple Java processes using either Java GSS * or native GSS * @library /test/lib * @compile -XDignore.symbol.file BasicProc.java * @run main jdk.test.lib.FileInstaller TestHosts TestHosts * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicProc launcher
*/
/** * Run this test automatically and test Java GSS with embedded KDC. * * Run with customized native.krb5.libs to test interop between Java GSS * and native GSS, and native.kdc.path with a native KDC. For example, * run the following command to test interop among Java, default native, * MIT, and Heimdal krb5 libraries with the Heimdal KDC: * * jtreg -Dnative.krb5.libs=j=, * n=, * k=/usr/local/krb5/lib/libgssapi_krb5.so, * h=/space/install/heimdal/lib/libgssapi.so \ * -Dnative.kdc.path=/usr/local/heimdal \ * BasicProc.java * * Note: The first 4 lines should be concatenated to make a long system * property value with no blank around ",". This comma-separated value * has each element being name=libpath. The special name "j" means the * Java library and libpath is ignored. Otherwise it means a native library, * and libpath (can be empty) will be the value for the sun.security.jgss.lib * system property. If this system property is not set, only the Java * library will be tested.
*/
/** * A Proc for a child process. * * @param lib the library. Null is Java. "" is default native lib.
*/ privatestatic Proc proc(String lib) throws Exception {
Proc p = Proc.create("BasicProc")
.inheritProp("jdk.net.hosts.file")
.prop("java.security.manager", "")
.perm(new javax.security.auth.AuthPermission("doAs")); if (lib != null) {
p.env("KRB5_CONFIG", CONF)
.env("KRB5_TRACE", Platform.isWindows() ? "CON" : "/dev/stderr")
.prop("sun.security.jgss.native", "true")
.prop("sun.security.jgss.lib", lib)
.prop("javax.security.auth.useSubjectCredsOnly", "false")
.prop("sun.security.nativegss.debug", "true"); int pos = lib.lastIndexOf('/'); if (pos > 0) {
p.env(Platform.sharedLibraryPathVariableName(), lib.substring(0, pos));
}
} else {
p.perm(new java.util.PropertyPermission( "sun.security.krb5.principal", "read")) // For Krb5LoginModule::login.
.perm(new javax.security.auth.AuthPermission( "modifyPrincipals"))
.perm(new javax.security.auth.AuthPermission( "modifyPrivateCredentials"))
.prop("sun.security.krb5.debug", "true")
.prop("java.security.krb5.conf", CONF);
} return p;
}
}
Messung V0.5
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.13Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.