/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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 6857795
* @bug 6858589
* @bug 6972005
* @summary krb5.conf ignored if system properties on realm and kdc are provided
*/
public class ConfPlusProp {
new ConfPlusProp().run();
}
}
try {
throw new AssertionError("Default realm error");
}
} catch (Exception e) {
if (r != null) throw e;
}
}
try {
throw new AssertionError(r + " kdc not " + k);
}
} catch (Exception e) {
if (k != null) throw e;
}
}
// No prop, only conf
// Point to a file with existing default_realm
refresh();
checkDefaultRealm("R1");
throw new Exception("Extra config error");
}
// Point to a file with no libdefaults
refresh();
// Zero-config is supported since 1.7
if (version >= 7) {
// Point to a non-existing file
refresh();
// Default realm might come from DNS
//checkDefaultRealm(null);
throw new Exception("Extra config error");
}
}
// Add prop
// Point to a file with existing default_realm
refresh();
checkDefaultRealm("R2");
throw new Exception("Extra config error");
}
// Point to a file with no libdefaults
refresh();
checkDefaultRealm("R2");
// Point to a non-existing file
refresh();
checkDefaultRealm("R2");
throw new Exception("Extra config error");
}
}
}