2034N/A/*
3579N/A * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
2034N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2034N/A *
2034N/A * This code is free software; you can redistribute it and/or modify it
2034N/A * under the terms of the GNU General Public License version 2 only, as
2034N/A * published by the Free Software Foundation.
2034N/A *
2034N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2034N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2034N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2034N/A * version 2 for more details (a copy is included in the LICENSE file that
2034N/A * accompanied this code).
2034N/A *
2034N/A * You should have received a copy of the GNU General Public License version
2034N/A * 2 along with this work; if not, write to the Free Software Foundation,
2034N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2034N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
2034N/A */
2034N/A
2034N/A/*
2034N/A * @test
2034N/A * @bug 6843127
3579N/A * @run main/othervm/timeout=300 BadKdc3
2034N/A * @summary krb5 should not try to access unavailable kdc too often
2034N/A */
2034N/A
2034N/Aimport java.io.*;
2034N/Aimport java.security.Security;
2034N/A
2034N/Apublic class BadKdc3 {
2034N/A
2034N/A public static void main(String[] args)
2034N/A throws Exception {
2034N/A Security.setProperty("krb5.kdc.bad.policy", "tryLast");
2034N/A BadKdc.go(
5496N/A "121212222222(32){2,4}", // 1 2
5496N/A "(32){2,4}", // 1 2
2034N/A // refresh
5496N/A "121212222222(32){2,4}", // 1 2
5496N/A // k3 off k2 on
5496N/A "323232121212(22){2,4}", // 1 3
2034N/A // k1 on
5496N/A "(22){2,4}" // 1 3
2034N/A );
2034N/A }
2034N/A}