From 970a08a6e164098107549cee1defae404cb24436 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Thu, 07 Apr 2011 20:35:36 +0000
Subject: [PATCH] Fix Issue OPENDJ-19 - execute control-panel as any user The control-panel script checks at startup that the user is the owner of the local instance. This prevents anyone from using the control-panel to access remote servers. Added an option (-r or --remote) to skip the local checks.
---
opends/src/guitools/org/opends/guitools/controlpanel/ControlPanel.java | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ControlPanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ControlPanel.java
index bf9a9a9..3bd097a 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ControlPanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ControlPanel.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2008-2010 Sun Microsystems, Inc.
+ * Portions Copyright 2011 ForgeRock AS
*/
package org.opends.guitools.controlpanel;
@@ -140,6 +141,11 @@
localOrRemote.pack();
Utilities.centerOnScreen(localOrRemote);
+ if (argParser.isRemote())
+ {
+ updateLocalOrRemotePanel(localOrRemote);
+ }
+
if (argParser.getBindPassword() != null)
{
updateLocalOrRemotePanel(localOrRemote);
@@ -217,6 +223,10 @@
getLocalOrRemotePanel(localOrRemote.getContentPane());
if (panel != null)
{
+ if (argParser.isRemote())
+ {
+ panel.setRemote(true);
+ }
if (argParser.getExplicitHostName() != null)
{
panel.setHostName(argParser.getExplicitHostName());
--
Gitblit v1.10.0