Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/native/java/security/AccessController.c
38829 views
/*1* Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425/*-26* Implementation of class java.security.AccessController27*28*/2930#include <string.h>3132#include "jni.h"33#include "jvm.h"34#include "java_security_AccessController.h"3536/*37* Class: java_security_AccessController38* Method: doPrivileged39* Signature: (Ljava/security/PrivilegedAction;)Ljava/lang/Object;40*/41JNIEXPORT jobject JNICALL Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_242(JNIEnv *env, jclass cls, jobject action)43{44return JVM_DoPrivileged(env, cls, action, NULL, JNI_FALSE);45}4647/*48* Class: java_security_AccessController49* Method: doPrivileged50* Signature: (Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;51*/52JNIEXPORT jobject JNICALL Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_253(JNIEnv *env, jclass cls, jobject action, jobject context)54{55return JVM_DoPrivileged(env, cls, action, context, JNI_FALSE);56}5758/*59* Class: java_security_AccessController60* Method: doPrivileged61* Signature: (Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;62*/63JNIEXPORT jobject JNICALL Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_264(JNIEnv *env, jclass cls, jobject action)65{66return JVM_DoPrivileged(env, cls, action, NULL, JNI_TRUE);67}6869/*70* Class: java_security_AccessController71* Method: doPrivileged72* Signature: (Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;73*/74JNIEXPORT jobject JNICALL Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_275(JNIEnv *env, jclass cls, jobject action, jobject context)76{77return JVM_DoPrivileged(env, cls, action, context, JNI_TRUE);78}7980JNIEXPORT jobject JNICALL81Java_java_security_AccessController_getStackAccessControlContext(82JNIEnv *env,83jobject this)84{85return JVM_GetStackAccessControlContext(env, this);86}878889JNIEXPORT jobject JNICALL90Java_java_security_AccessController_getInheritedAccessControlContext(91JNIEnv *env,92jobject this)93{94return JVM_GetInheritedAccessControlContext(env, this);95}969798