All Downloads are FREE. Search and download functionalities are using the official Maven repository.

java.awt.AWTPermission Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
/*

NOTICE


(c) 2005-2007 Sun Microsystems, Inc. All Rights Reserved.

Neither this file nor any files generated from it describe a complete specification, and they may only be used as described below. For example, no permission is given for you to incorporate this file, in whole or in part, in an implementation of a Java specification.

Sun Microsystems Inc. owns the copyright in this file and it is provided to you for informative, as opposed to normative, use. The file and any files generated from it may be used to generate other informative documentation, such as a unified set of documents of API signatures for a platform that includes technologies expressed as Java APIs. The file may also be used to produce "compilation stubs," which allow applications to be compiled and validated for such platforms.

Any work generated from this file, such as unified javadocs or compiled stub files, must be accompanied by this notice in its entirety.

This work corresponds to the API signatures of JSR 217: Personal Basis Profile 1.1. In the event of a discrepency between this work and the JSR 217 specification, which is available at http://www.jcp.org/en/jsr/detail?id=217, the latter takes precedence. */ package java.awt; import java.security.BasicPermission; // PBP/PP // [6187233] /** * This class is for AWT permissions. * An AWTPermission contains a target name but * no actions list; you either have the named permission * or you don't. * *

* The target name is the name of the AWT permission (see below). The naming * convention follows the hierarchical property naming convention. * Also, an asterisk could be used to represent all AWT permissions. * *

* The following table lists all the possible AWTPermission * target names, and for each provides a description of what the * permission allows and a discussion of the risks of granting code * the permission. *

* *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
accessClipboardPosting and retrieval of information to and from the AWT clipboardThis would allow malfeasant code to share * potentially sensitive or confidential information.
accessEventQueueAccess to the AWT event queueAfter retrieving the AWT event queue, * malicious code may peek at and even remove existing events * from its event queue, as well as post bogus events which may purposefully * cause the application or applet to misbehave in an insecure manner.
fullScreenExclusiveEnter full-screen exclusive modeEntering full-screen exclusive mode allows direct access to * low-level graphics card memory. This could be used to spoof the * system, since the program is in direct control of rendering.
listenToAllAWTEventsListen to all AWT events, system-wideAfter adding an AWT event listener, * malicious code may scan all AWT events dispatched in the system, * allowing it to read all user input (such as passwords). Each * AWT event listener is called from within the context of that * event queue's EventDispatchThread, so if the accessEventQueue * permission is also enabled, malicious code could modify the * contents of AWT event queues system-wide, causing the application * or applet to misbehave in an insecure manner.
readDisplayPixelsReadback of pixels from the display screenInterfaces which allow arbitrary code to examine pixels on the * display enable malicious code to snoop on the activities of the user.
replaceKeyboardFocusManagerSets the KeyboardFocusManager for * a particular thread. * When SecurityManager is installed, the invoking * thread must be granted this permission in order to replace * the current KeyboardFocusManager. If permission * is not granted, a SecurityException will be thrown. *
showWindowWithoutWarningBannerDisplay of a window without also displaying a banner warning * that the window was created by an appletWithout this warning, * an applet may pop up windows without the user knowing that they * belong to an applet. Since users may make security-sensitive * decisions based on whether or not the window belongs to an applet * (entering a username and password into a dialog box, for example), * disabling this warning banner may allow applets to trick the user * into entering such information.
* * @see java.security.BasicPermission * @see java.security.Permission * @see java.security.Permissions * @see java.security.PermissionCollection * @see java.lang.SecurityManager * * @version 1.24, 01/28/03 * * @author Marianne Mueller * @author Roland Schemers */ public final class AWTPermission extends BasicPermission { /** use serialVersionUID from the Java 2 platform for interoperability */ private static final long serialVersionUID = 8890392402588814465L; /** * Creates a new AWTPermission with the specified name. * The name is the symbolic name of the AWTPermission, * such as "topLevelWindow", "systemClipboard", etc. An asterisk * may be used to indicate all AWT permissions. * * @param name the name of the AWTPermission */ public AWTPermission(String name) { super(null); } /** * Creates a new AWTPermission object with the specified name. * The name is the symbolic name of the AWTPermission, and the * actions string is currently unused and should be null. * * @param name the name of the AWTPermission * @param actions should be null */ public AWTPermission(String name, String actions) { super(null); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy