运行 PrivilegedAction 的签名小程序仍然失败并出现 AccessControlException [英] Signed applet running a PrivilegedAction still fails with an AccessControlException

查看:21
本文介绍了运行 PrivilegedAction 的签名小程序仍然失败并出现 AccessControlException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于签名小程序允许的特权操作是否有某种限制?这是堆栈跟踪:

Is there some sort of limit to what privileged actions are permitted even for signed applets? Here is the stack trace:

线程AWT-EventQueue-2"中的异常 java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.skype)在 java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)在 java.security.AccessController.checkPermission(AccessController.java:546)在 java.lang.SecurityManager.checkPermission(SecurityManager.java:532)在 java.lang.SecurityManager.checkLink(SecurityManager.java:818)在 java.lang.Runtime.loadLibrary0(Runtime.java:817)在 java.lang.System.loadLibrary(System.java:1045)在 com.skype.connector.ConnectorUtils.loadLibrary(ConnectorUtils.java:321)在 com.skype.connector.osx.SkypeFramework.init(SkypeFramework.java:44)在 com.skype.connector.osx.OSXConnector.initializeImpl(OSXConnector.java:107)在 com.skype.connector.Connector.initialize(Connector.java:485)在 com.skype.connector.osx.OSXConnector.isRunning(OSXConnector.java:86)在 com.skype.Skype.isRunning(Skype.java:172)

推荐答案

发现问题.特权操作在我的小程序中,我的小程序的 jar 已签名,但需要特权的代码位于另一个未签名的 jar 中.签署另一个 jar 解决了这个问题.另一件事是,即使我从特权操作包装器中取出调用,只要罐子被签名,它仍然可以工作.

Found the problem. The privileged action is in my applet and my applet's jar is signed but the code that's needing the privileges is in another jar that's not signed. Signing that other jar fixed the problem. Another thing is that even when I took the call out of the privileged action wrapper, it still works so long as the jars are signed.

这篇关于运行 PrivilegedAction 的签名小程序仍然失败并出现 AccessControlException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆