diff options
author | Tom Grimshaw | 2010-07-22 10:46:57 -0700 |
---|---|---|
committer | Tom Grimshaw | 2010-07-22 10:46:57 -0700 |
commit | 9ce2f95f37c6234c9750c611106730c65ec6f1f5 (patch) | |
tree | 69bf309b1e51f9bcd73ca80dde932d55b0072aba /OpenSim | |
parent | Merge branch '0.6.9-post-fixes' into careminster (diff) | |
download | opensim-SC_OLD-9ce2f95f37c6234c9750c611106730c65ec6f1f5.zip opensim-SC_OLD-9ce2f95f37c6234c9750c611106730c65ec6f1f5.tar.gz opensim-SC_OLD-9ce2f95f37c6234c9750c611106730c65ec6f1f5.tar.bz2 opensim-SC_OLD-9ce2f95f37c6234c9750c611106730c65ec6f1f5.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.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 1ec96a0..b21793e 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -91,6 +91,10 @@ namespace OpenSim | |||
91 | 91 | ||
92 | protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); | 92 | protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); |
93 | 93 | ||
94 | private List<string> m_permsModules; | ||
95 | |||
96 | private bool m_securePermissionsLoading = true; | ||
97 | |||
94 | /// <value> | 98 | /// <value> |
95 | /// The config information passed into the OpenSimulator region server. | 99 | /// The config information passed into the OpenSimulator region server. |
96 | /// </value> | 100 | /// </value> |
@@ -188,6 +192,11 @@ namespace OpenSim | |||
188 | CreatePIDFile(pidFile); | 192 | CreatePIDFile(pidFile); |
189 | 193 | ||
190 | userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); | 194 | userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); |
195 | |||
196 | m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true); | ||
197 | |||
198 | string permissionModules = startupConfig.GetString("permissionmodules", "DefaultPermissionsModule"); | ||
199 | m_permsModules = new List<string>(permissionModules.Split(',')); | ||
191 | } | 200 | } |
192 | 201 | ||
193 | base.StartupSpecific(); | 202 | base.StartupSpecific(); |
@@ -345,6 +354,18 @@ namespace OpenSim | |||
345 | } | 354 | } |
346 | else m_log.Error("[MODULES]: The new RegionModulesController is missing..."); | 355 | else m_log.Error("[MODULES]: The new RegionModulesController is missing..."); |
347 | 356 | ||
357 | if (m_securePermissionsLoading) | ||
358 | { | ||
359 | foreach (string s in m_permsModules) | ||
360 | { | ||
361 | if (!scene.RegionModules.ContainsKey(s)) | ||
362 | { | ||
363 | m_log.Fatal("[MODULES]: Required module " + s + " not found."); | ||
364 | Environment.Exit(0); | ||
365 | } | ||
366 | } | ||
367 | } | ||
368 | |||
348 | scene.SetModuleInterfaces(); | 369 | scene.SetModuleInterfaces(); |
349 | // First Step of bootreport sequence | 370 | // First Step of bootreport sequence |
350 | if (scene.SnmpService != null) | 371 | if (scene.SnmpService != null) |