зеркало из https://github.com/mozilla/pjs.git
Added AllJavaPermission target to give complete access to all permissions in Javasoft's JVM
This commit is contained in:
Родитель
0630a3d992
Коммит
e4fd57098a
|
@ -28,6 +28,7 @@ static NS_DEFINE_CID(kCCapsManagerCID, NS_CCAPSMANAGER_CID);
|
||||||
static NS_DEFINE_IID(kICapsManagerIID, NS_ICAPSMANAGER_IID);
|
static NS_DEFINE_IID(kICapsManagerIID, NS_ICAPSMANAGER_IID);
|
||||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||||
|
|
||||||
|
#define ALL_JAVA_PERMISSION "AllJavaPermission"
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
// from nsISupports and AggregatedQueryInterface:
|
// from nsISupports and AggregatedQueryInterface:
|
||||||
|
@ -125,7 +126,7 @@ nsCCapsManager::GetPermission(nsIPrincipal* pNSIPrincipal,
|
||||||
nsITarget* ignoreTarget,
|
nsITarget* ignoreTarget,
|
||||||
nsPermission *state)
|
nsPermission *state)
|
||||||
{
|
{
|
||||||
nsTarget *target = nsTarget::findTarget("AllPermission");
|
nsTarget *target = nsTarget::findTarget(ALL_JAVA_PERMISSION);
|
||||||
nsresult result = NS_OK;
|
nsresult result = NS_OK;
|
||||||
if( target == NULL )
|
if( target == NULL )
|
||||||
{
|
{
|
||||||
|
@ -163,7 +164,7 @@ nsCCapsManager::SetPermission(nsIPrincipal* pNSIPrincipal,
|
||||||
nsITarget* ignoreTarget,
|
nsITarget* ignoreTarget,
|
||||||
nsPermission state)
|
nsPermission state)
|
||||||
{
|
{
|
||||||
nsTarget *target = nsTarget::findTarget("AllPermission");
|
nsTarget *target = nsTarget::findTarget(ALL_JAVA_PERMISSION);
|
||||||
nsresult result = NS_OK;
|
nsresult result = NS_OK;
|
||||||
if( target == NULL )
|
if( target == NULL )
|
||||||
{
|
{
|
||||||
|
@ -197,7 +198,7 @@ nsCCapsManager::AskPermission(nsIPrincipal* pNSIPrincipal,
|
||||||
nsITarget* ignoreTarget,
|
nsITarget* ignoreTarget,
|
||||||
nsPermission *state)
|
nsPermission *state)
|
||||||
{
|
{
|
||||||
nsTarget *target = nsTarget::findTarget("AllPermission");
|
nsTarget *target = nsTarget::findTarget(ALL_JAVA_PERMISSION);
|
||||||
nsresult result = NS_OK;
|
nsresult result = NS_OK;
|
||||||
if( target == NULL )
|
if( target == NULL )
|
||||||
{
|
{
|
||||||
|
|
|
@ -217,6 +217,11 @@ extern int CAPS_TARGET_URL_ACCOUNT_SETUP;
|
||||||
extern int CAPS_TARGET_DESC_CONSTELLATION;
|
extern int CAPS_TARGET_DESC_CONSTELLATION;
|
||||||
extern int CAPS_TARGET_DETAIL_DESC_CONSTELLATION;
|
extern int CAPS_TARGET_DETAIL_DESC_CONSTELLATION;
|
||||||
extern int CAPS_TARGET_URL_CONSTELLATION;
|
extern int CAPS_TARGET_URL_CONSTELLATION;
|
||||||
|
|
||||||
|
extern int CAPS_TARGET_DESC_ALL_JAVA_PERMISSION;
|
||||||
|
extern int CAPS_TARGET_DETAIL_DESC_ALL_JAVA_PERMISSION;
|
||||||
|
extern int CAPS_TARGET_URL_ALL_JAVA_PERMISSION;
|
||||||
|
|
||||||
extern int CAPS_TARGET_RISK_COLOR_HIGH;
|
extern int CAPS_TARGET_RISK_COLOR_HIGH;
|
||||||
extern int CAPS_TARGET_RISK_COLOR_HIGH;
|
extern int CAPS_TARGET_RISK_COLOR_HIGH;
|
||||||
|
|
||||||
|
@ -1124,6 +1129,17 @@ PRBool CreateSystemTargets(nsPrincipal *sysPrin)
|
||||||
JavaSecUI_getHelpURL(CAPS_TARGET_URL_CONSTELLATION),
|
JavaSecUI_getHelpURL(CAPS_TARGET_URL_CONSTELLATION),
|
||||||
targetPtrArray);
|
targetPtrArray);
|
||||||
target->registerTarget();
|
target->registerTarget();
|
||||||
|
|
||||||
|
|
||||||
|
/* Permission to All privileges in Java */
|
||||||
|
target = new nsUserTarget("AllJavaPermission", sysPrin,
|
||||||
|
targetRiskHigh,
|
||||||
|
targetRiskColorHigh,
|
||||||
|
JavaSecUI_getString(CAPS_TARGET_DESC_ALL_JAVA_PERMISSION),
|
||||||
|
JavaSecUI_getString(CAPS_TARGET_DETAIL_DESC_ALL_JAVA_PERMISSION),
|
||||||
|
JavaSecUI_getHelpURL(CAPS_TARGET_URL_ALL_JAVA_PERMISSION));
|
||||||
|
target->registerTarget();
|
||||||
|
|
||||||
return PR_TRUE;
|
return PR_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче