< prev index next >

test/jdk/sun/security/krb5/auto/tools/KinitConfPlusProps.java

Print this page
rev 51638 : [mq]: 8210112


   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.io.File;
  25 import java.util.HashMap;
  26 import java.util.Map;
  27 import jdk.testlibrary.ProcessTools;
  28 import jdk.testlibrary.OutputAnalyzer;
  29 
  30 /*
  31  * @test
  32  * @bug 6857795 8075299
  33  * @summary Checks if kinit uses both krb5 conf file and system properties
  34  * @requires os.family == "windows"
  35  * @library /lib/testlibrary
  36  * @library /sun/security/krb5/auto
  37  * @run main/othervm KinitConfPlusProps
  38  */
  39 public class KinitConfPlusProps {
  40 
  41     private static final String KINIT = System.getProperty("java.home")
  42             + File.separator + "bin" + File.separator + "kinit";
  43     private static final String KLIST = System.getProperty("java.home")
  44             + File.separator + "bin" + File.separator + "klist";
  45     private static final String REALM = "REALM";
  46     private static final String ANOTHER_REALM = "ANOTHER.REALM";
  47     private static final String HOST = "localhost";
  48     private static final String CC_FILENAME = "krb5cc_test";
  49     private static final String USER = "TESTER";
  50     private static final String USER_PRINCIPAL = USER + "@" + REALM;
  51     private static final String KRBTGT_PRINCIPAL = "krbtgt/" + REALM;
  52     private static final String KEYTAB_FILE = "test.keytab";
  53     private static final String KRB5_CONF_FILENAME = "krb5.conf";
  54 
  55     public static void main(String[] args) throws Exception {




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.io.File;
  25 import java.util.HashMap;
  26 import java.util.Map;
  27 import jdk.test.lib.process.ProcessTools;
  28 import jdk.test.lib.process.OutputAnalyzer;
  29 
  30 /*
  31  * @test
  32  * @bug 6857795 8075299
  33  * @summary Checks if kinit uses both krb5 conf file and system properties
  34  * @requires os.family == "windows"
  35  * @library /test/lib
  36  * @library /sun/security/krb5/auto
  37  * @run main/othervm KinitConfPlusProps
  38  */
  39 public class KinitConfPlusProps {
  40 
  41     private static final String KINIT = System.getProperty("java.home")
  42             + File.separator + "bin" + File.separator + "kinit";
  43     private static final String KLIST = System.getProperty("java.home")
  44             + File.separator + "bin" + File.separator + "klist";
  45     private static final String REALM = "REALM";
  46     private static final String ANOTHER_REALM = "ANOTHER.REALM";
  47     private static final String HOST = "localhost";
  48     private static final String CC_FILENAME = "krb5cc_test";
  49     private static final String USER = "TESTER";
  50     private static final String USER_PRINCIPAL = USER + "@" + REALM;
  51     private static final String KRBTGT_PRINCIPAL = "krbtgt/" + REALM;
  52     private static final String KEYTAB_FILE = "test.keytab";
  53     private static final String KRB5_CONF_FILENAME = "krb5.conf";
  54 
  55     public static void main(String[] args) throws Exception {


< prev index next >