1#! /bin/sh 2 3# 4# Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 5# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6# 7# This code is free software; you can redistribute it and/or modify it 8# under the terms of the GNU General Public License version 2 only, as 9# published by the Free Software Foundation. 10# 11# This code is distributed in the hope that it will be useful, but WITHOUT 12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14# version 2 for more details (a copy is included in the LICENSE file that 15# accompanied this code). 16# 17# You should have received a copy of the GNU General Public License version 18# 2 along with this work; if not, write to the Free Software Foundation, 19# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20# 21# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22# or visit www.oracle.com if you need additional information or have any 23# questions. 24# 25 26# @test 1.1, 02/14/01 27# @author Ram Marti 28# @bug 4399067 29# @summary Subject.doAs(null, action) does not clear the executing 30# 31# ${TESTJAVA} is pointing to the jre 32# 33# set platform-dependent variables 34OS=`uname -s` 35case "$OS" in 36 SunOS ) 37 PS=":" 38 FS="/" 39 RM="/bin/rm -f" 40 ;; 41 Linux ) 42 PS=":" 43 FS="/" 44 RM="/bin/rm -f" 45 ;; 46 Darwin ) 47 PS=":" 48 FS="/" 49 RM="/bin/rm -f" 50 ;; 51 AIX ) 52 PS=":" 53 FS="/" 54 RM="/bin/rm -f" 55 ;; 56 CYGWIN* ) 57 PS=";" 58 FS="/" 59 RM="rm" 60 ;; 61 Windows* ) 62 PS=";" 63 FS="\\" 64 RM="rm" 65 ;; 66 * ) 67 echo "Unrecognized system!" 68 exit 1; 69 ;; 70esac 71# remove any leftover built class 72cd ${TESTCLASSES}${FS} 73${RM} Test.class 74${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES}${FS} \ 75 ${TESTSRC}${FS}Test.java 76WD=`pwd` 77cd ${TESTSRC}${FS} 78cd $WD 79echo $WD 80${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath "${TESTCLASSES}${FS}" \ 81-Djava.security.manager \ 82-Djava.security.policy=${TESTSRC}${FS}policy \ 83Test 84 85exit $? 86