4340N/A#
4340N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
4340N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4340N/A#
4340N/A# This code is free software; you can redistribute it and/or modify it
4340N/A# under the terms of the GNU General Public License version 2 only, as
4340N/A# published by the Free Software Foundation.
4340N/A#
4340N/A# This code is distributed in the hope that it will be useful, but WITHOUT
4340N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4340N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4340N/A# version 2 for more details (a copy is included in the LICENSE file that
4340N/A# accompanied this code).
4340N/A#
4340N/A# You should have received a copy of the GNU General Public License version
4340N/A# 2 along with this work; if not, write to the Free Software Foundation,
4340N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4340N/A#
4340N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4340N/A# or visit www.oracle.com if you need additional information or have any
4340N/A# questions.
4340N/A#
4340N/A
4340N/A# @test
4340N/A# @bug 7043737
4340N/A# @summary klist does not detect non-existing keytab
4340N/A# @run shell ktmissing.sh
4340N/A#
4340N/A
4340N/AOS=`uname -s`
4340N/Acase "$OS" in
4340N/A CYGWIN* )
4340N/A FS="/"
4340N/A ;;
4340N/A Windows_* )
4340N/A FS="\\"
4340N/A ;;
4340N/A * )
4340N/A FS="/"
4340N/A echo "Unsupported system!"
4340N/A exit 0;
4340N/A ;;
4340N/Aesac
4340N/A
4340N/A${TESTJAVA}${FS}bin${FS}klist -k this_file_does_not_exist && exit 1
4340N/A
4340N/Aecho ABC > this_is_not_a_keytab
4340N/A
4340N/A${TESTJAVA}${FS}bin${FS}klist -k this_is_not_a_keytab && exit 2
4340N/A
4340N/Aexit 0