aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTom2010-08-01 10:21:56 -0700
committerTom2010-08-01 10:21:56 -0700
commitd5f497478a371107c568844321a4663bccfbf527 (patch)
treee30593c7ceda42020c9d7827254c5f6f9b59fbab /OpenSim
parentMerge branch 'master' into careminster-presence-refactor (diff)
downloadopensim-SC-d5f497478a371107c568844321a4663bccfbf527.zip
opensim-SC-d5f497478a371107c568844321a4663bccfbf527.tar.gz
opensim-SC-d5f497478a371107c568844321a4663bccfbf527.tar.bz2
opensim-SC-d5f497478a371107c568844321a4663bccfbf527.tar.xz
Add config option securePermissionsLoading which will stop the region from loading if the specified permissions modules fail to load.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 27cb137..9267721 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -88,6 +88,10 @@ namespace OpenSim
88 88
89 protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); 89 protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>();
90 90
91 private List<string> m_permsModules;
92
93 private bool m_securePermissionsLoading = true;
94
91 /// <value> 95 /// <value>
92 /// The config information passed into the OpenSimulator region server. 96 /// The config information passed into the OpenSimulator region server.
93 /// </value> 97 /// </value>
@@ -185,6 +189,11 @@ namespace OpenSim
185 CreatePIDFile(pidFile); 189 CreatePIDFile(pidFile);
186 190
187 userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); 191 userStatsURI = startupConfig.GetString("Stats_URI", String.Empty);
192
193 m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true);
194
195 string permissionModules = startupConfig.GetString("permissionmodules", "DefaultPermissionsModule");
196 m_permsModules = new List<string>(permissionModules.Split(','));
188 } 197 }
189 198
190 base.StartupSpecific(); 199 base.StartupSpecific();
@@ -342,6 +351,18 @@ namespace OpenSim
342 } 351 }
343 else m_log.Error("[MODULES]: The new RegionModulesController is missing..."); 352 else m_log.Error("[MODULES]: The new RegionModulesController is missing...");
344 353
354 if (m_securePermissionsLoading)
355 {
356 foreach (string s in m_permsModules)
357 {
358 if (!scene.RegionModules.ContainsKey(s))
359 {
360 m_log.Fatal("[MODULES]: Required module " + s + " not found.");
361 Environment.Exit(0);
362 }
363 }
364 }
365
345 scene.SetModuleInterfaces(); 366 scene.SetModuleInterfaces();
346// First Step of bootreport sequence 367// First Step of bootreport sequence
347 if (scene.SnmpService != null) 368 if (scene.SnmpService != null)