5497N/A/*
5497N/A * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
5497N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5497N/A *
5497N/A * This code is free software; you can redistribute it and/or modify it
5497N/A * under the terms of the GNU General Public License version 2 only, as
5497N/A * published by the Free Software Foundation.
5497N/A *
5497N/A * This code is distributed in the hope that it will be useful, but WITHOUT
5497N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5497N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5497N/A * version 2 for more details (a copy is included in the LICENSE file that
5497N/A * accompanied this code).
5497N/A *
5497N/A * You should have received a copy of the GNU General Public License version
5497N/A * 2 along with this work; if not, write to the Free Software Foundation,
5497N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5497N/A *
5497N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5497N/A * or visit www.oracle.com if you need additional information or have any
5497N/A * questions.
5497N/A */
5497N/A
5497N/A// See dns.sh.
5497N/Aimport sun.security.krb5.Config;
5497N/A
5497N/Apublic class DNS {
5497N/A public static void main(String[] args) throws Exception {
5497N/A System.setProperty("java.security.krb5.conf",
5497N/A System.getProperty("test.src", ".") +"/nothing.conf");
5497N/A Config config = Config.getInstance();
5497N/A String kdcs = config.getKDCList("X");
5497N/A if (!kdcs.equals("a.com.:88 b.com.:99") &&
5497N/A !kdcs.equals("a.com. b.com.:99")) {
5497N/A throw new Exception("Strange KDC: [" + kdcs + "]");
5497N/A };
5497N/A }
5497N/A}