diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index e897f7c..4319fa0 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -192,16 +192,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
192 | } | 192 | } |
193 | } | 193 | } |
194 | 194 | ||
195 | private void FailIfRemoteAdminDisabled(string requestName) | ||
196 | { | ||
197 | if (m_config == null) | ||
198 | { | ||
199 | 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); | ||
200 | m_log.Error(errorMessage); | ||
201 | throw new ApplicationException(errorMessage); | ||
202 | } | ||
203 | } | ||
204 | |||
205 | private void FailIfRemoteAdminNotAllowed(string password, string check_ip_address) | 195 | private void FailIfRemoteAdminNotAllowed(string password, string check_ip_address) |
206 | { | 196 | { |
207 | if (m_accessIP.Count > 0 && !m_accessIP.Contains(check_ip_address)) | 197 | if (m_accessIP.Count > 0 && !m_accessIP.Contains(check_ip_address)) |
@@ -379,7 +369,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
379 | } | 369 | } |
380 | 370 | ||
381 | public XmlRpcResponse XmlRpcSaveHeightmapMethod(XmlRpcRequest request, IPEndPoint remoteClient) | 371 | public XmlRpcResponse XmlRpcSaveHeightmapMethod(XmlRpcRequest request, IPEndPoint remoteClient) |
382 | |||
383 | { | 372 | { |
384 | XmlRpcResponse response = new XmlRpcResponse(); | 373 | XmlRpcResponse response = new XmlRpcResponse(); |
385 | Hashtable responseData = new Hashtable(); | 374 | Hashtable responseData = new Hashtable(); |
@@ -570,8 +559,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
570 | { | 559 | { |
571 | m_log.Info("[RADMIN]: CreateRegion: new request"); | 560 | m_log.Info("[RADMIN]: CreateRegion: new request"); |
572 | 561 | ||
573 | FailIfRemoteAdminDisabled("CreateRegion"); | ||
574 | |||
575 | XmlRpcResponse response = new XmlRpcResponse(); | 562 | XmlRpcResponse response = new XmlRpcResponse(); |
576 | Hashtable responseData = new Hashtable(); | 563 | Hashtable responseData = new Hashtable(); |
577 | 564 | ||
@@ -927,6 +914,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
927 | public XmlRpcResponse XmlRpcCloseRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient) | 914 | public XmlRpcResponse XmlRpcCloseRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient) |
928 | { | 915 | { |
929 | m_log.Info("[RADMIN]: CloseRegion: new request"); | 916 | m_log.Info("[RADMIN]: CloseRegion: new request"); |
917 | |||
930 | XmlRpcResponse response = new XmlRpcResponse(); | 918 | XmlRpcResponse response = new XmlRpcResponse(); |
931 | Hashtable responseData = new Hashtable(); | 919 | Hashtable responseData = new Hashtable(); |
932 | Scene scene = null; | 920 | Scene scene = null; |
@@ -1130,8 +1118,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1130 | { | 1118 | { |
1131 | m_log.Info("[RADMIN]: CreateUser: new request"); | 1119 | m_log.Info("[RADMIN]: CreateUser: new request"); |
1132 | 1120 | ||
1133 | FailIfRemoteAdminDisabled("CreateUser"); | ||
1134 | |||
1135 | XmlRpcResponse response = new XmlRpcResponse(); | 1121 | XmlRpcResponse response = new XmlRpcResponse(); |
1136 | Hashtable responseData = new Hashtable(); | 1122 | Hashtable responseData = new Hashtable(); |
1137 | 1123 | ||
@@ -1245,8 +1231,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1245 | { | 1231 | { |
1246 | m_log.Info("[RADMIN]: UserExists: new request"); | 1232 | m_log.Info("[RADMIN]: UserExists: new request"); |
1247 | 1233 | ||
1248 | FailIfRemoteAdminDisabled("UserExists"); | ||
1249 | |||
1250 | XmlRpcResponse response = new XmlRpcResponse(); | 1234 | XmlRpcResponse response = new XmlRpcResponse(); |
1251 | Hashtable responseData = new Hashtable(); | 1235 | Hashtable responseData = new Hashtable(); |
1252 | 1236 | ||
@@ -1348,8 +1332,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1348 | m_log.Info("[RADMIN]: UpdateUserAccount: new request"); | 1332 | m_log.Info("[RADMIN]: UpdateUserAccount: new request"); |
1349 | m_log.Warn("[RADMIN]: This method needs update for 0.7"); | 1333 | m_log.Warn("[RADMIN]: This method needs update for 0.7"); |
1350 | 1334 | ||
1351 | FailIfRemoteAdminDisabled("UpdateUserAccount"); | ||
1352 | |||
1353 | XmlRpcResponse response = new XmlRpcResponse(); | 1335 | XmlRpcResponse response = new XmlRpcResponse(); |
1354 | Hashtable responseData = new Hashtable(); | 1336 | Hashtable responseData = new Hashtable(); |
1355 | 1337 | ||
@@ -2259,8 +2241,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2259 | { | 2241 | { |
2260 | m_log.Info("[RADMIN]: Received Load OAR Administrator Request"); | 2242 | m_log.Info("[RADMIN]: Received Load OAR Administrator Request"); |
2261 | 2243 | ||
2262 | FailIfRemoteAdminDisabled("Load OAR"); | ||
2263 | |||
2264 | XmlRpcResponse response = new XmlRpcResponse(); | 2244 | XmlRpcResponse response = new XmlRpcResponse(); |
2265 | Hashtable responseData = new Hashtable(); | 2245 | Hashtable responseData = new Hashtable(); |
2266 | 2246 | ||
@@ -2370,8 +2350,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2370 | { | 2350 | { |
2371 | m_log.Info("[RADMIN]: Received Save OAR Administrator Request"); | 2351 | m_log.Info("[RADMIN]: Received Save OAR Administrator Request"); |
2372 | 2352 | ||
2373 | FailIfRemoteAdminDisabled("Save OAR"); | ||
2374 | |||
2375 | XmlRpcResponse response = new XmlRpcResponse(); | 2353 | XmlRpcResponse response = new XmlRpcResponse(); |
2376 | Hashtable responseData = new Hashtable(); | 2354 | Hashtable responseData = new Hashtable(); |
2377 | 2355 | ||
@@ -2467,8 +2445,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2467 | { | 2445 | { |
2468 | m_log.Info("[RADMIN]: Received Load XML Administrator Request"); | 2446 | m_log.Info("[RADMIN]: Received Load XML Administrator Request"); |
2469 | 2447 | ||
2470 | FailIfRemoteAdminDisabled("Load XML"); | ||
2471 | |||
2472 | XmlRpcResponse response = new XmlRpcResponse(); | 2448 | XmlRpcResponse response = new XmlRpcResponse(); |
2473 | Hashtable responseData = new Hashtable(); | 2449 | Hashtable responseData = new Hashtable(); |
2474 | 2450 | ||
@@ -2547,8 +2523,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2547 | { | 2523 | { |
2548 | m_log.Info("[RADMIN]: Received Save XML Administrator Request"); | 2524 | m_log.Info("[RADMIN]: Received Save XML Administrator Request"); |
2549 | 2525 | ||
2550 | FailIfRemoteAdminDisabled("Save XML"); | ||
2551 | |||
2552 | XmlRpcResponse response = new XmlRpcResponse(); | 2526 | XmlRpcResponse response = new XmlRpcResponse(); |
2553 | Hashtable responseData = new Hashtable(); | 2527 | Hashtable responseData = new Hashtable(); |
2554 | 2528 | ||
@@ -2623,8 +2597,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2623 | { | 2597 | { |
2624 | m_log.Info("[RADMIN]: Received Query XML Administrator Request"); | 2598 | m_log.Info("[RADMIN]: Received Query XML Administrator Request"); |
2625 | 2599 | ||
2626 | FailIfRemoteAdminDisabled("Query XML"); | ||
2627 | |||
2628 | XmlRpcResponse response = new XmlRpcResponse(); | 2600 | XmlRpcResponse response = new XmlRpcResponse(); |
2629 | Hashtable responseData = new Hashtable(); | 2601 | Hashtable responseData = new Hashtable(); |
2630 | 2602 | ||
@@ -2682,8 +2654,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2682 | { | 2654 | { |
2683 | m_log.Info("[RADMIN]: Received Command XML Administrator Request"); | 2655 | m_log.Info("[RADMIN]: Received Command XML Administrator Request"); |
2684 | 2656 | ||
2685 | FailIfRemoteAdminDisabled("Command XML"); | ||
2686 | |||
2687 | XmlRpcResponse response = new XmlRpcResponse(); | 2657 | XmlRpcResponse response = new XmlRpcResponse(); |
2688 | Hashtable responseData = new Hashtable(); | 2658 | Hashtable responseData = new Hashtable(); |
2689 | 2659 | ||
@@ -2720,8 +2690,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2720 | { | 2690 | { |
2721 | m_log.Info("[RADMIN]: Received Access List Clear Request"); | 2691 | m_log.Info("[RADMIN]: Received Access List Clear Request"); |
2722 | 2692 | ||
2723 | FailIfRemoteAdminDisabled("Access List Clear"); | ||
2724 | |||
2725 | XmlRpcResponse response = new XmlRpcResponse(); | 2693 | XmlRpcResponse response = new XmlRpcResponse(); |
2726 | Hashtable responseData = new Hashtable(); | 2694 | Hashtable responseData = new Hashtable(); |
2727 | 2695 | ||
@@ -2779,8 +2747,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2779 | { | 2747 | { |
2780 | m_log.Info("[RADMIN]: Received Access List Add Request"); | 2748 | m_log.Info("[RADMIN]: Received Access List Add Request"); |
2781 | 2749 | ||
2782 | FailIfRemoteAdminDisabled("Access List Add"); | ||
2783 | |||
2784 | XmlRpcResponse response = new XmlRpcResponse(); | 2750 | XmlRpcResponse response = new XmlRpcResponse(); |
2785 | Hashtable responseData = new Hashtable(); | 2751 | Hashtable responseData = new Hashtable(); |
2786 | 2752 | ||
@@ -2866,8 +2832,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2866 | { | 2832 | { |
2867 | m_log.Info("[RADMIN]: Received Access List Remove Request"); | 2833 | m_log.Info("[RADMIN]: Received Access List Remove Request"); |
2868 | 2834 | ||
2869 | FailIfRemoteAdminDisabled("Access List Remove"); | ||
2870 | |||
2871 | XmlRpcResponse response = new XmlRpcResponse(); | 2835 | XmlRpcResponse response = new XmlRpcResponse(); |
2872 | Hashtable responseData = new Hashtable(); | 2836 | Hashtable responseData = new Hashtable(); |
2873 | 2837 | ||
@@ -2953,8 +2917,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2953 | { | 2917 | { |
2954 | m_log.Info("[RADMIN]: Received Access List List Request"); | 2918 | m_log.Info("[RADMIN]: Received Access List List Request"); |
2955 | 2919 | ||
2956 | FailIfRemoteAdminDisabled("Access List List"); | ||
2957 | |||
2958 | XmlRpcResponse response = new XmlRpcResponse(); | 2920 | XmlRpcResponse response = new XmlRpcResponse(); |
2959 | Hashtable responseData = new Hashtable(); | 2921 | Hashtable responseData = new Hashtable(); |
2960 | 2922 | ||