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/resource/bin/control-panel |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/opends/resource/bin/control-panel b/opends/resource/bin/control-panel
index 1c01f6a..44bc496 100644
--- a/opends/resource/bin/control-panel
+++ b/opends/resource/bin/control-panel
@@ -24,6 +24,7 @@
 #
 #
 #      Copyright 2008 Sun Microsystems, Inc.
+#      Portions Copyright 2011 ForgeRock AS
 
 
 # This script may be used to display the control panel.
@@ -34,6 +35,13 @@
 export SCRIPT_NAME
 
 NO_CHECK=0
+for i in $*
+do 
+  if [ "$i" == "-r" ] || [ "$i" == "--remote" ]
+  then
+    NO_CHECK=1
+  fi
+done
 export NO_CHECK
 
 SCRIPT_DIR=`dirname "${0}"`

--
Gitblit v1.10.0