AccessController.c revision 0
3832N/A/*
3832N/A * Copyright 1997-1998 Sun Microsystems, Inc. All Rights Reserved.
3832N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3832N/A *
3832N/A * This code is free software; you can redistribute it and/or modify it
3832N/A * under the terms of the GNU General Public License version 2 only, as
3832N/A * published by the Free Software Foundation. Sun designates this
3832N/A * particular file as subject to the "Classpath" exception as provided
3832N/A * by Sun in the LICENSE file that accompanied this code.
3832N/A *
3832N/A * This code is distributed in the hope that it will be useful, but WITHOUT
3832N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3832N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3832N/A * version 2 for more details (a copy is included in the LICENSE file that
3832N/A * accompanied this code).
3832N/A *
3832N/A * You should have received a copy of the GNU General Public License version
3832N/A * 2 along with this work; if not, write to the Free Software Foundation,
3832N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3832N/A *
3832N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
3832N/A * CA 95054 USA or visit www.sun.com if you need additional information or
3832N/A * have any questions.
3832N/A */
5061N/A
3832N/A/*-
3832N/A * Implementation of class java.security.AccessController
4458N/A *
3832N/A */
3832N/A
3832N/A#include <string.h>
3832N/A
4692N/A#include "jni.h"
4692N/A#include "jvm.h"
4776N/A#include "java_security_AccessController.h"
4776N/A
4776N/A/*
4776N/A * Class: java_security_AccessController
4776N/A * Method: doPrivileged
4692N/A * Signature: (Ljava/security/PrivilegedAction;)Ljava/lang/Object;
4692N/A */
4692N/AJNIEXPORT jobject JNICALL Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2
4692N/A (JNIEnv *env, jclass cls, jobject action)
4776N/A{
4776N/A return JVM_DoPrivileged(env, cls, action, NULL, JNI_FALSE);
4776N/A}
4692N/A
4692N/A/*
4692N/A * Class: java_security_AccessController
4692N/A * Method: doPrivileged
4692N/A * Signature: (Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;
4692N/A */
3832N/AJNIEXPORT jobject JNICALL Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2
3832N/A (JNIEnv *env, jclass cls, jobject action, jobject context)
5061N/A{
3832N/A return JVM_DoPrivileged(env, cls, action, context, JNI_FALSE);
5061N/A}
3832N/A
4458N/A/*
4458N/A * Class: java_security_AccessController
4458N/A * Method: doPrivileged
4458N/A * Signature: (Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;
4458N/A */
4458N/AJNIEXPORT jobject JNICALL Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2
4458N/A (JNIEnv *env, jclass cls, jobject action)
4458N/A{
3832N/A return JVM_DoPrivileged(env, cls, action, NULL, JNI_TRUE);
4458N/A}
3832N/A
3832N/A/*
4458N/A * Class: java_security_AccessController
3832N/A * Method: doPrivileged
5061N/A * Signature: (Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;
3832N/A */
4458N/AJNIEXPORT jobject JNICALL Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2
4458N/A (JNIEnv *env, jclass cls, jobject action, jobject context)
4458N/A{
5061N/A return JVM_DoPrivileged(env, cls, action, context, JNI_TRUE);
5061N/A}
5061N/A
5061N/AJNIEXPORT jobject JNICALL
5061N/AJava_java_security_AccessController_getStackAccessControlContext(
5061N/A JNIEnv *env,
5061N/A jobject this)
5061N/A{
5061N/A return JVM_GetStackAccessControlContext(env, this);
4458N/A}
4458N/A
3832N/A
4458N/AJNIEXPORT jobject JNICALL
3832N/AJava_java_security_AccessController_getInheritedAccessControlContext(
3832N/A JNIEnv *env,
3832N/A jobject this)
3832N/A{
3832N/A return JVM_GetInheritedAccessControlContext(env, this);
3832N/A}
3832N/A