From c9276f20518d3e6895ace534a1098f49eb2dbf1c Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 16 Jan 2010 04:38:24 +0000 Subject: [PATCH 1/5] Shorten the names of the tags in monitorstats summary to the immediate type name sans namespace. Needs adjustment of scripts using these!. Request my name still uses full namespace path. --- .../CoreModules/Framework/Monitoring/MonitorModule.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs index d84f4ea56c..96d65d7676 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs @@ -112,7 +112,11 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring string xml = ""; foreach (IMonitor monitor in m_monitors) { - xml += "<" + monitor.ToString() + ">" + monitor.GetValue() + ""; + string elemName = monitor.ToString(); + if (elemName.StartsWith(monitor.GetType().Namespace)) + elemName = elemName.Substring(monitor.GetType().Namespace.Length + 1); + + xml += "<" + elemName + ">" + monitor.GetValue() + ""; } xml += ""; From 74b3ce857228ae948d99ad4b6ef35f35e7742b2c Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 16 Jan 2010 04:57:49 +0000 Subject: [PATCH 2/5] Let monitor data be requested using either the short form of the name or the full, namespace qualified version. --- .../Region/CoreModules/Framework/Monitoring/MonitorModule.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs index 96d65d7676..f15f8f6de1 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs @@ -87,7 +87,10 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring foreach (IMonitor monitor in m_monitors) { - if (monitor.ToString() == monID) + string elemName = monitor.ToString(); + if (elemName.StartsWith(monitor.GetType().Namespace)) + elemName = elemName.Substring(monitor.GetType().Namespace.Length + 1); + if (elemName == monID || monitor.ToString() == monID) { Hashtable ereply3 = new Hashtable(); From 3ff28e7a8f6a7816dd76307c36153ba8f393dea1 Mon Sep 17 00:00:00 2001 From: CasperW Date: Mon, 18 Jan 2010 17:56:27 +0100 Subject: [PATCH 3/5] Fix a major security problem with osSetDynamicTexture which allowed the deletion of /any/ asset. --- .../DynamicTexture/DynamicTextureModule.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index f51d0c2464..679c871441 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs @@ -358,11 +358,18 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture // tmptex.DefaultTexture.Fullbright = true; part.UpdateTexture(tmptex); - } - - if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0)) - { - scene.AssetService.Delete(oldID.ToString()); + } + + if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0)) + { + if (oldAsset == null) oldAsset = scene.AssetService.Get(oldID.ToString()); + if (oldAsset != null) + { + if (oldAsset.Temporary == true) + { + scene.AssetService.Delete(oldID.ToString()); + } + } } } From 6772c9d2b6d05c985174f514aa8df2aacd33a201 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 18 Jan 2010 17:35:49 +0000 Subject: [PATCH 4/5] Comment the asset deletion handler. It can be abused and is not currently needed. --- OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs b/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs index 3f33da628b..f33bb90fde 100644 --- a/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs +++ b/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs @@ -63,7 +63,7 @@ namespace OpenSim.Server.Handlers.Asset if (p.Length > 0) { - result = m_AssetService.Delete(p[0]); + // result = m_AssetService.Delete(p[0]); } XmlSerializer xs = new XmlSerializer(typeof(bool)); From 24056dc98ba94b32ac98cc0a3b1b85d5f8ef3de6 Mon Sep 17 00:00:00 2001 From: Careminster Staff Date: Mon, 18 Jan 2010 16:23:13 -0600 Subject: [PATCH 5/5] Adds example to OpenSim.ini.example for Admin Default Parcel settings --- .../CoreModules/World/Land/LandManagementModule.cs | 10 ++++++++-- bin/OpenSim.ini.example | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 6a0e8d1a85..28669b976e 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -81,7 +81,7 @@ namespace OpenSim.Region.CoreModules.World.Land private int m_lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1; private bool m_allowedForcefulBans = true; - private string DefaultGodParcelGroup; + private UUID DefaultGodParcelGroup; private string DefaultGodParcelName; // caches ExtendedLandData @@ -96,6 +96,12 @@ namespace OpenSim.Region.CoreModules.World.Land public void Initialise(IConfigSource source) { + IConfig cnf = source.Configs["LandManagement"]; + if (cnf == null) + { + DefaultGodParcelGroup = new UUID(cnf.GetString("DefaultAdministratorGroupUUID", UUID.Zero.ToString())); + DefaultGodParcelName = cnf.GetString("DefaultAdministratorParcelName", "Default Parcel"); + } } public void AddRegion(Scene scene) @@ -1566,7 +1572,7 @@ namespace OpenSim.Region.CoreModules.World.Land land = landObject; } } - land.DeedToGroup(new UUID(DefaultGodParcelGroup)); + land.DeedToGroup(DefaultGodParcelGroup); land.LandData.Name = DefaultGodParcelName; land.SendLandUpdateToAvatarsOverMe(); } diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index c96e9381f1..23004a4b17 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -1351,6 +1351,9 @@ ; For example- http://127.0.0.1:9000/SStats/ ; enabled=false +[LandManagement] +; DefaultAdministratorGroupUUID = ""; +; DefaultAdministratorParcelName = ""; ;; ;; These are defaults that are overwritten below in [Architecture].