public final class LinkPermission extends BasicPermission
Permission
类。
下表提供了一个对权限允许的简要说明,并讨论了授予代码权限的风险。
Permission Target Name | What the Permission Allows | Risks of Allowing this Permission |
---|---|---|
hard | Ability to add an existing file to a directory. This is sometimes known as creating a link, or hard link. | Extreme care should be taken when granting this permission. It allows linking to any file or directory in the file system thus allowing the attacker access to all files. |
symbolic | Ability to create symbolic links. | Extreme care should be taken when granting this permission. It allows linking to any file or directory in the file system thus allowing the attacker to access to all files. |
Constructor and Description |
---|
LinkPermission(String name)
构建了一个具有指定名称的
LinkPermission 。
|
LinkPermission(String name, String actions)
构建了一个具有指定名称的
LinkPermission 。
|
equals, getActions, hashCode, implies, newPermissionCollection
checkGuard, getName, toString
public LinkPermission(String name)
LinkPermission
。
name
-权限的名称。它必须是“硬”或“象征性的”。
IllegalArgumentException
如果名称是空的或无效的
public LinkPermission(String name, String actions)
LinkPermission
具有指定名称。
name
-权限的名称;必须是“硬”或“符号”。
actions
-权限的行为;必须是空字符串或
null
IllegalArgumentException
如果名称是空的或无效的行为,或是一个非空字符串
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.