aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs40
1 files changed, 1 insertions, 39 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index bcf98a1..0c4012c 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -193,16 +193,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
193 } 193 }
194 } 194 }
195 195
196 private void FailIfRemoteAdminDisabled(string requestName)
197 {
198 if (m_config == null)
199 {
200 string errorMessage = String.Format("[RADMIN] {0}: Remote admin request denied! Please set [RemoteAdmin] enabled=true in OpenSim.ini in order to enable remote admin functionality", requestName);
201 m_log.Error(errorMessage);
202 throw new ApplicationException(errorMessage);
203 }
204 }
205
206 private void FailIfRemoteAdminNotAllowed(string password, string check_ip_address) 196 private void FailIfRemoteAdminNotAllowed(string password, string check_ip_address)
207 { 197 {
208 if (m_accessIP.Count > 0 && !m_accessIP.Contains(check_ip_address)) 198 if (m_accessIP.Count > 0 && !m_accessIP.Contains(check_ip_address))
@@ -463,7 +453,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
463 } 453 }
464 454
465 public XmlRpcResponse XmlRpcSaveHeightmapMethod(XmlRpcRequest request, IPEndPoint remoteClient) 455 public XmlRpcResponse XmlRpcSaveHeightmapMethod(XmlRpcRequest request, IPEndPoint remoteClient)
466
467 { 456 {
468 XmlRpcResponse response = new XmlRpcResponse(); 457 XmlRpcResponse response = new XmlRpcResponse();
469 Hashtable responseData = new Hashtable(); 458 Hashtable responseData = new Hashtable();
@@ -674,8 +663,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
674 { 663 {
675 m_log.Info("[RADMIN]: CreateRegion: new request"); 664 m_log.Info("[RADMIN]: CreateRegion: new request");
676 665
677 FailIfRemoteAdminDisabled("CreateRegion");
678
679 XmlRpcResponse response = new XmlRpcResponse(); 666 XmlRpcResponse response = new XmlRpcResponse();
680 Hashtable responseData = new Hashtable(); 667 Hashtable responseData = new Hashtable();
681 668
@@ -1031,6 +1018,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1031 public XmlRpcResponse XmlRpcCloseRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient) 1018 public XmlRpcResponse XmlRpcCloseRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient)
1032 { 1019 {
1033 m_log.Info("[RADMIN]: CloseRegion: new request"); 1020 m_log.Info("[RADMIN]: CloseRegion: new request");
1021
1034 XmlRpcResponse response = new XmlRpcResponse(); 1022 XmlRpcResponse response = new XmlRpcResponse();
1035 Hashtable responseData = new Hashtable(); 1023 Hashtable responseData = new Hashtable();
1036 Scene scene = null; 1024 Scene scene = null;
@@ -1234,8 +1222,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1234 { 1222 {
1235 m_log.Info("[RADMIN]: CreateUser: new request"); 1223 m_log.Info("[RADMIN]: CreateUser: new request");
1236 1224
1237 FailIfRemoteAdminDisabled("CreateUser");
1238
1239 XmlRpcResponse response = new XmlRpcResponse(); 1225 XmlRpcResponse response = new XmlRpcResponse();
1240 Hashtable responseData = new Hashtable(); 1226 Hashtable responseData = new Hashtable();
1241 1227
@@ -1349,8 +1335,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1349 { 1335 {
1350 m_log.Info("[RADMIN]: UserExists: new request"); 1336 m_log.Info("[RADMIN]: UserExists: new request");
1351 1337
1352 FailIfRemoteAdminDisabled("UserExists");
1353
1354 XmlRpcResponse response = new XmlRpcResponse(); 1338 XmlRpcResponse response = new XmlRpcResponse();
1355 Hashtable responseData = new Hashtable(); 1339 Hashtable responseData = new Hashtable();
1356 1340
@@ -1452,8 +1436,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1452 m_log.Info("[RADMIN]: UpdateUserAccount: new request"); 1436 m_log.Info("[RADMIN]: UpdateUserAccount: new request");
1453 m_log.Warn("[RADMIN]: This method needs update for 0.7"); 1437 m_log.Warn("[RADMIN]: This method needs update for 0.7");
1454 1438
1455 FailIfRemoteAdminDisabled("UpdateUserAccount");
1456
1457 XmlRpcResponse response = new XmlRpcResponse(); 1439 XmlRpcResponse response = new XmlRpcResponse();
1458 Hashtable responseData = new Hashtable(); 1440 Hashtable responseData = new Hashtable();
1459 1441
@@ -2363,8 +2345,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2363 { 2345 {
2364 m_log.Info("[RADMIN]: Received Load OAR Administrator Request"); 2346 m_log.Info("[RADMIN]: Received Load OAR Administrator Request");
2365 2347
2366 FailIfRemoteAdminDisabled("Load OAR");
2367
2368 XmlRpcResponse response = new XmlRpcResponse(); 2348 XmlRpcResponse response = new XmlRpcResponse();
2369 Hashtable responseData = new Hashtable(); 2349 Hashtable responseData = new Hashtable();
2370 2350
@@ -2474,8 +2454,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2474 { 2454 {
2475 m_log.Info("[RADMIN]: Received Save OAR Administrator Request"); 2455 m_log.Info("[RADMIN]: Received Save OAR Administrator Request");
2476 2456
2477 FailIfRemoteAdminDisabled("Save OAR");
2478
2479 XmlRpcResponse response = new XmlRpcResponse(); 2457 XmlRpcResponse response = new XmlRpcResponse();
2480 Hashtable responseData = new Hashtable(); 2458 Hashtable responseData = new Hashtable();
2481 2459
@@ -2571,8 +2549,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2571 { 2549 {
2572 m_log.Info("[RADMIN]: Received Load XML Administrator Request"); 2550 m_log.Info("[RADMIN]: Received Load XML Administrator Request");
2573 2551
2574 FailIfRemoteAdminDisabled("Load XML");
2575
2576 XmlRpcResponse response = new XmlRpcResponse(); 2552 XmlRpcResponse response = new XmlRpcResponse();
2577 Hashtable responseData = new Hashtable(); 2553 Hashtable responseData = new Hashtable();
2578 2554
@@ -2651,8 +2627,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2651 { 2627 {
2652 m_log.Info("[RADMIN]: Received Save XML Administrator Request"); 2628 m_log.Info("[RADMIN]: Received Save XML Administrator Request");
2653 2629
2654 FailIfRemoteAdminDisabled("Save XML");
2655
2656 XmlRpcResponse response = new XmlRpcResponse(); 2630 XmlRpcResponse response = new XmlRpcResponse();
2657 Hashtable responseData = new Hashtable(); 2631 Hashtable responseData = new Hashtable();
2658 2632
@@ -2727,8 +2701,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2727 { 2701 {
2728 m_log.Info("[RADMIN]: Received Query XML Administrator Request"); 2702 m_log.Info("[RADMIN]: Received Query XML Administrator Request");
2729 2703
2730 FailIfRemoteAdminDisabled("Query XML");
2731
2732 XmlRpcResponse response = new XmlRpcResponse(); 2704 XmlRpcResponse response = new XmlRpcResponse();
2733 Hashtable responseData = new Hashtable(); 2705 Hashtable responseData = new Hashtable();
2734 2706
@@ -2790,8 +2762,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2790 { 2762 {
2791 m_log.Info("[RADMIN]: Received Command XML Administrator Request"); 2763 m_log.Info("[RADMIN]: Received Command XML Administrator Request");
2792 2764
2793 FailIfRemoteAdminDisabled("Command XML");
2794
2795 XmlRpcResponse response = new XmlRpcResponse(); 2765 XmlRpcResponse response = new XmlRpcResponse();
2796 Hashtable responseData = new Hashtable(); 2766 Hashtable responseData = new Hashtable();
2797 2767
@@ -2828,8 +2798,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2828 { 2798 {
2829 m_log.Info("[RADMIN]: Received Access List Clear Request"); 2799 m_log.Info("[RADMIN]: Received Access List Clear Request");
2830 2800
2831 FailIfRemoteAdminDisabled("Access List Clear");
2832
2833 XmlRpcResponse response = new XmlRpcResponse(); 2801 XmlRpcResponse response = new XmlRpcResponse();
2834 Hashtable responseData = new Hashtable(); 2802 Hashtable responseData = new Hashtable();
2835 2803
@@ -2887,8 +2855,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2887 { 2855 {
2888 m_log.Info("[RADMIN]: Received Access List Add Request"); 2856 m_log.Info("[RADMIN]: Received Access List Add Request");
2889 2857
2890 FailIfRemoteAdminDisabled("Access List Add");
2891
2892 XmlRpcResponse response = new XmlRpcResponse(); 2858 XmlRpcResponse response = new XmlRpcResponse();
2893 Hashtable responseData = new Hashtable(); 2859 Hashtable responseData = new Hashtable();
2894 2860
@@ -2974,8 +2940,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2974 { 2940 {
2975 m_log.Info("[RADMIN]: Received Access List Remove Request"); 2941 m_log.Info("[RADMIN]: Received Access List Remove Request");
2976 2942
2977 FailIfRemoteAdminDisabled("Access List Remove");
2978
2979 XmlRpcResponse response = new XmlRpcResponse(); 2943 XmlRpcResponse response = new XmlRpcResponse();
2980 Hashtable responseData = new Hashtable(); 2944 Hashtable responseData = new Hashtable();
2981 2945
@@ -3061,8 +3025,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
3061 { 3025 {
3062 m_log.Info("[RADMIN]: Received Access List List Request"); 3026 m_log.Info("[RADMIN]: Received Access List List Request");
3063 3027
3064 FailIfRemoteAdminDisabled("Access List List");
3065
3066 XmlRpcResponse response = new XmlRpcResponse(); 3028 XmlRpcResponse response = new XmlRpcResponse();
3067 Hashtable responseData = new Hashtable(); 3029 Hashtable responseData = new Hashtable();
3068 3030