aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-12-29 16:56:48 +0000
committerJustin Clarke Casey2008-12-29 16:56:48 +0000
commit266d0fbaaeac0dad06da98ceda8d19b8f3d732d6 (patch)
tree45f2ad93db485b5144c3fc86662891432c3a877a
parentRevamp the return logic to close a privilege escalation loophole. (diff)
downloadopensim-SC_OLD-266d0fbaaeac0dad06da98ceda8d19b8f3d732d6.zip
opensim-SC_OLD-266d0fbaaeac0dad06da98ceda8d19b8f3d732d6.tar.gz
opensim-SC_OLD-266d0fbaaeac0dad06da98ceda8d19b8f3d732d6.tar.bz2
opensim-SC_OLD-266d0fbaaeac0dad06da98ceda8d19b8f3d732d6.tar.xz
* Apply http://opensimulator.org/mantis/view.php?id=2927 with some changes
* This allows configuration of the assetset and library control file paths to be other than ./inventory/Libraries.xml and ./assets/AssetSets.xml * This is controlled via the LibrariesXMLFile and AssetSetsXMLFile configuration settings in [StandAlone] in OpenSim.ini (in standalone) and via the user and asset config xml files for grid mode * Thanks to SirKimba for the patch
-rw-r--r--OpenSim/Framework/AssetConfig.cs10
-rw-r--r--OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs14
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServerBase.cs4
-rw-r--r--OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs27
-rw-r--r--OpenSim/Framework/ConfigSettings.cs25
-rw-r--r--OpenSim/Framework/IAssetLoader.cs1
-rw-r--r--OpenSim/Framework/UserConfig.cs11
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs8
-rw-r--r--OpenSim/Grid/UserServer/Main.cs2
-rw-r--r--OpenSim/Region/Application/ConfigurationLoader.cs13
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs4
-rw-r--r--bin/OpenSim.ini.example10
12 files changed, 87 insertions, 42 deletions
diff --git a/OpenSim/Framework/AssetConfig.cs b/OpenSim/Framework/AssetConfig.cs
index 9ae98d7..cc0217f 100644
--- a/OpenSim/Framework/AssetConfig.cs
+++ b/OpenSim/Framework/AssetConfig.cs
@@ -40,6 +40,7 @@ namespace OpenSim.Framework
40 public string DatabaseConnect = String.Empty; 40 public string DatabaseConnect = String.Empty;
41 public string DatabaseProvider = String.Empty; 41 public string DatabaseProvider = String.Empty;
42 public uint HttpPort = DefaultHttpPort; 42 public uint HttpPort = DefaultHttpPort;
43 public string AssetSetsLocation = string.Empty;
43 44
44 public AssetConfig(string description, string filename) 45 public AssetConfig(string description, string filename)
45 { 46 {
@@ -58,6 +59,10 @@ namespace OpenSim.Framework
58 59
59 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, 60 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
60 "Http Listener port", DefaultHttpPort.ToString(), false); 61 "Http Listener port", DefaultHttpPort.ToString(), false);
62
63 configMember.addConfigurationOption("assetset_location", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
64 "Location of 'AssetSets.xml'",
65 string.Format(".{0}assets{0}AssetSets.xml", System.IO.Path.DirectorySeparatorChar), false);
61 } 66 }
62 67
63 public bool handleIncomingConfiguration(string configuration_key, object configuration_result) 68 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
@@ -70,6 +75,9 @@ namespace OpenSim.Framework
70 case "database_connect": 75 case "database_connect":
71 DatabaseConnect = (string) configuration_result; 76 DatabaseConnect = (string) configuration_result;
72 break; 77 break;
78 case "assetset_location":
79 AssetSetsLocation = (string) configuration_result;
80 break;
73 case "http_port": 81 case "http_port":
74 HttpPort = (uint) configuration_result; 82 HttpPort = (uint) configuration_result;
75 break; 83 break;
@@ -78,4 +86,4 @@ namespace OpenSim.Framework
78 return true; 86 return true;
79 } 87 }
80 } 88 }
81} \ No newline at end of file 89}
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
index 6fe9fb4..9d0f697 100644
--- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
+++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
@@ -86,12 +86,6 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
86 } 86 }
87 } 87 }
88 88
89 public void ForEachDefaultXmlAsset(Action<AssetBase> action)
90 {
91 string assetSetFilename = Path.Combine(Util.assetsDir(), "AssetSets.xml");
92
93 ForEachDefaultXmlAsset(assetSetFilename, action);
94 }
95 89
96 public void ForEachDefaultXmlAsset(string assetSetFilename, Action<AssetBase> action) 90 public void ForEachDefaultXmlAsset(string assetSetFilename, Action<AssetBase> action)
97 { 91 {
@@ -99,16 +93,18 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
99 if (File.Exists(assetSetFilename)) 93 if (File.Exists(assetSetFilename))
100 { 94 {
101 string assetSetPath = "ERROR"; 95 string assetSetPath = "ERROR";
102 96 string assetRootPath = "";
103 try 97 try
104 { 98 {
105 XmlConfigSource source = new XmlConfigSource(assetSetFilename); 99 XmlConfigSource source = new XmlConfigSource(assetSetFilename);
100 assetRootPath = Path.GetFullPath(source.SavePath);
101 assetRootPath = Path.GetDirectoryName(assetRootPath);
106 102
107 for (int i = 0; i < source.Configs.Count; i++) 103 for (int i = 0; i < source.Configs.Count; i++)
108 { 104 {
109 assetSetPath = source.Configs[i].GetString("file", String.Empty); 105 assetSetPath = source.Configs[i].GetString("file", String.Empty);
110 106
111 LoadXmlAssetSet(Path.Combine(Util.assetsDir(), assetSetPath), assets); 107 LoadXmlAssetSet(Path.Combine(assetRootPath, assetSetPath), assets);
112 } 108 }
113 } 109 }
114 catch (XmlException e) 110 catch (XmlException e)
@@ -118,7 +114,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
118 } 114 }
119 else 115 else
120 { 116 {
121 m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.xml does not exist! No assets loaded."); 117 m_log.ErrorFormat("[ASSETS]: Asset set control file {0} does not exist! No assets loaded.", assetSetFilename);
122 } 118 }
123 119
124 assets.ForEach(action); 120 assets.ForEach(action);
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
index a289fb7..137bde9 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
@@ -106,11 +106,11 @@ namespace OpenSim.Framework.Communications.Cache
106 } 106 }
107 } 107 }
108 108
109 public virtual void LoadDefaultAssets() 109 public virtual void LoadDefaultAssets(string pAssetSetsXml)
110 { 110 {
111 m_log.Info("[ASSET SERVER]: Setting up asset database"); 111 m_log.Info("[ASSET SERVER]: Setting up asset database");
112 112
113 assetLoader.ForEachDefaultXmlAsset(StoreAsset); 113 assetLoader.ForEachDefaultXmlAsset(pAssetSetsXml, StoreAsset);
114 } 114 }
115 115
116 public AssetServerBase() 116 public AssetServerBase()
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index cf3490b..0b05adf 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -52,11 +52,9 @@ namespace OpenSim.Framework.Communications.Cache
52 /// </summary> 52 /// </summary>
53 protected Dictionary<UUID, InventoryFolderImpl> libraryFolders 53 protected Dictionary<UUID, InventoryFolderImpl> libraryFolders
54 = new Dictionary<UUID, InventoryFolderImpl>(); 54 = new Dictionary<UUID, InventoryFolderImpl>();
55 55
56 public LibraryRootFolder() 56 public LibraryRootFolder(string pLibrariesLocation)
57 { 57 {
58 m_log.Info("[LIBRARY INVENTORY]: Loading library inventory");
59
60 Owner = libOwner; 58 Owner = libOwner;
61 ID = new UUID("00000112-000f-0000-0000-000100bba000"); 59 ID = new UUID("00000112-000f-0000-0000-000100bba000");
62 Name = "OpenSim Library"; 60 Name = "OpenSim Library";
@@ -66,7 +64,7 @@ namespace OpenSim.Framework.Communications.Cache
66 64
67 libraryFolders.Add(ID, this); 65 libraryFolders.Add(ID, this);
68 66
69 LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.xml")); 67 LoadLibraries(pLibrariesLocation);
70 } 68 }
71 69
72 public InventoryItemBase CreateItem(UUID inventoryID, UUID assetID, string name, string description, 70 public InventoryItemBase CreateItem(UUID inventoryID, UUID assetID, string name, string description,
@@ -96,9 +94,7 @@ namespace OpenSim.Framework.Communications.Cache
96 /// <param name="assets"></param> 94 /// <param name="assets"></param>
97 protected void LoadLibraries(string librariesControlPath) 95 protected void LoadLibraries(string librariesControlPath)
98 { 96 {
99 m_log.InfoFormat( 97 m_log.InfoFormat("[LIBRARY INVENTORY]: Loading library control file {0}", librariesControlPath);
100 "[LIBRARY INVENTORY]: Loading libraries control file {0}", librariesControlPath);
101
102 LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig); 98 LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig);
103 } 99 }
104 100
@@ -106,17 +102,18 @@ namespace OpenSim.Framework.Communications.Cache
106 /// Read a library set from config 102 /// Read a library set from config
107 /// </summary> 103 /// </summary>
108 /// <param name="config"></param> 104 /// <param name="config"></param>
109 protected void ReadLibraryFromConfig(IConfig config) 105 protected void ReadLibraryFromConfig(IConfig config, string path)
110 { 106 {
107 string basePath = Path.GetDirectoryName(path);
111 string foldersPath 108 string foldersPath
112 = Path.Combine( 109 = Path.Combine(
113 Util.inventoryDir(), config.GetString("foldersFile", String.Empty)); 110 basePath, config.GetString("foldersFile", String.Empty));
114 111
115 LoadFromFile(foldersPath, "Library folders", ReadFolderFromConfig); 112 LoadFromFile(foldersPath, "Library folders", ReadFolderFromConfig);
116 113
117 string itemsPath 114 string itemsPath
118 = Path.Combine( 115 = Path.Combine(
119 Util.inventoryDir(), config.GetString("itemsFile", String.Empty)); 116 basePath, config.GetString("itemsFile", String.Empty));
120 117
121 LoadFromFile(itemsPath, "Library items", ReadItemFromConfig); 118 LoadFromFile(itemsPath, "Library items", ReadItemFromConfig);
122 } 119 }
@@ -125,7 +122,7 @@ namespace OpenSim.Framework.Communications.Cache
125 /// Read a library inventory folder from a loaded configuration 122 /// Read a library inventory folder from a loaded configuration
126 /// </summary> 123 /// </summary>
127 /// <param name="source"></param> 124 /// <param name="source"></param>
128 private void ReadFolderFromConfig(IConfig config) 125 private void ReadFolderFromConfig(IConfig config, string path)
129 { 126 {
130 InventoryFolderImpl folderInfo = new InventoryFolderImpl(); 127 InventoryFolderImpl folderInfo = new InventoryFolderImpl();
131 128
@@ -158,7 +155,7 @@ namespace OpenSim.Framework.Communications.Cache
158 /// Read a library inventory item metadata from a loaded configuration 155 /// Read a library inventory item metadata from a loaded configuration
159 /// </summary> 156 /// </summary>
160 /// <param name="source"></param> 157 /// <param name="source"></param>
161 private void ReadItemFromConfig(IConfig config) 158 private void ReadItemFromConfig(IConfig config, string path)
162 { 159 {
163 InventoryItemBase item = new InventoryItemBase(); 160 InventoryItemBase item = new InventoryItemBase();
164 item.Owner = libOwner; 161 item.Owner = libOwner;
@@ -195,7 +192,7 @@ namespace OpenSim.Framework.Communications.Cache
195 } 192 }
196 } 193 }
197 194
198 private delegate void ConfigAction(IConfig config); 195 private delegate void ConfigAction(IConfig config, string path);
199 196
200 /// <summary> 197 /// <summary>
201 /// Load the given configuration at a path and perform an action on each Config contained within it 198 /// Load the given configuration at a path and perform an action on each Config contained within it
@@ -213,7 +210,7 @@ namespace OpenSim.Framework.Communications.Cache
213 210
214 for (int i = 0; i < source.Configs.Count; i++) 211 for (int i = 0; i < source.Configs.Count; i++)
215 { 212 {
216 action(source.Configs[i]); 213 action(source.Configs[i], path);
217 } 214 }
218 } 215 }
219 catch (XmlException e) 216 catch (XmlException e)
diff --git a/OpenSim/Framework/ConfigSettings.cs b/OpenSim/Framework/ConfigSettings.cs
index 02b8465..3d66311 100644
--- a/OpenSim/Framework/ConfigSettings.cs
+++ b/OpenSim/Framework/ConfigSettings.cs
@@ -179,5 +179,30 @@ namespace OpenSim.Framework
179 get { return m_dumpAssetsToFile; } 179 get { return m_dumpAssetsToFile; }
180 set { m_dumpAssetsToFile = value; } 180 set { m_dumpAssetsToFile = value; }
181 } 181 }
182
183 protected string m_librariesXMLFile;
184 public string LibrariesXMLFile
185 {
186 get
187 {
188 return m_librariesXMLFile;
189 }
190 set
191 {
192 m_librariesXMLFile = value;
193 }
194 }
195 protected string m_assetSetsXMLFile;
196 public string AssetSetsXMLFile
197 {
198 get
199 {
200 return m_assetSetsXMLFile;
201 }
202 set
203 {
204 m_assetSetsXMLFile = value;
205 }
206 }
182 } 207 }
183} 208}
diff --git a/OpenSim/Framework/IAssetLoader.cs b/OpenSim/Framework/IAssetLoader.cs
index 6aa71d3..3ecc051 100644
--- a/OpenSim/Framework/IAssetLoader.cs
+++ b/OpenSim/Framework/IAssetLoader.cs
@@ -31,7 +31,6 @@ namespace OpenSim.Framework
31{ 31{
32 public interface IAssetLoader 32 public interface IAssetLoader
33 { 33 {
34 void ForEachDefaultXmlAsset(Action<AssetBase> action);
35 void ForEachDefaultXmlAsset(string assetSetFilename, Action<AssetBase> action); 34 void ForEachDefaultXmlAsset(string assetSetFilename, Action<AssetBase> action);
36 } 35 }
37} \ No newline at end of file 36} \ No newline at end of file
diff --git a/OpenSim/Framework/UserConfig.cs b/OpenSim/Framework/UserConfig.cs
index 87ba271..cc048b7 100644
--- a/OpenSim/Framework/UserConfig.cs
+++ b/OpenSim/Framework/UserConfig.cs
@@ -47,6 +47,7 @@ namespace OpenSim.Framework
47 public uint HttpPort = DefaultHttpPort; 47 public uint HttpPort = DefaultHttpPort;
48 public bool HttpSSL = DefaultHttpSSL; 48 public bool HttpSSL = DefaultHttpSSL;
49 public uint DefaultUserLevel = 0; 49 public uint DefaultUserLevel = 0;
50 public string LibraryXmlfile = "";
50 51
51 private Uri m_inventoryUrl; 52 private Uri m_inventoryUrl;
52 53
@@ -109,6 +110,11 @@ namespace OpenSim.Framework
109 "Default Inventory Server URI", 110 "Default Inventory Server URI",
110 "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort + "/", 111 "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort + "/",
111 false); 112 false);
113 configMember.addConfigurationOption("library_location",
114 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
115 "Path to library control file",
116 string.Format(".{0}inventory{0}Libraries.xml", System.IO.Path.DirectorySeparatorChar), false);
117
112 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 118 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
113 "DLL for database provider", "OpenSim.Data.MySQL.dll", false); 119 "DLL for database provider", "OpenSim.Data.MySQL.dll", false);
114 configMember.addConfigurationOption("database_connect", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 120 configMember.addConfigurationOption("database_connect", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
@@ -173,7 +179,10 @@ namespace OpenSim.Framework
173 179
174 case "default_loginLevel": 180 case "default_loginLevel":
175 DefaultUserLevel = (uint)configuration_result; 181 DefaultUserLevel = (uint)configuration_result;
176 break; 182 break;
183 case "library_location":
184 LibraryXmlfile = (string)configuration_result;
185 break;
177 } 186 }
178 187
179 return true; 188 return true;
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index 6d1028b..72300b5 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -87,8 +87,8 @@ namespace OpenSim.Grid.AssetServer
87 m_log.Info("[ASSET]: Setting up asset DB"); 87 m_log.Info("[ASSET]: Setting up asset DB");
88 setupDB(config); 88 setupDB(config);
89 89
90 m_log.Info("[ASSET]: Loading default asset set.."); 90 m_log.Info("[ASSET]: Loading default asset set from '" + config.AssetSetsLocation + "'");
91 LoadDefaultAssets(); 91 LoadDefaultAssets(config.AssetSetsLocation);
92 92
93 m_log.Info("[ASSET]: Starting HTTP process"); 93 m_log.Info("[ASSET]: Starting HTTP process");
94 m_httpServer = new BaseHttpServer(config.HttpPort); 94 m_httpServer = new BaseHttpServer(config.HttpPort);
@@ -142,9 +142,9 @@ namespace OpenSim.Grid.AssetServer
142 } 142 }
143 } 143 }
144 144
145 public void LoadDefaultAssets() 145 public void LoadDefaultAssets(string pAssetSetsLocation)
146 { 146 {
147 assetLoader.ForEachDefaultXmlAsset(StoreAsset); 147 assetLoader.ForEachDefaultXmlAsset(pAssetSetsLocation, StoreAsset);
148 } 148 }
149 149
150 protected void StoreAsset(AssetBase asset) 150 protected void StoreAsset(AssetBase asset)
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index f688e4c..3246757 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -137,7 +137,7 @@ namespace OpenSim.Grid.UserServer
137 protected virtual void StartupLoginService(IInterServiceInventoryServices inventoryService) 137 protected virtual void StartupLoginService(IInterServiceInventoryServices inventoryService)
138 { 138 {
139 m_loginService = new UserLoginService( 139 m_loginService = new UserLoginService(
140 m_userManager, inventoryService, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); 140 m_userManager, inventoryService, new LibraryRootFolder(Cfg.LibraryXmlfile), Cfg, Cfg.DefaultStartupMsg);
141 } 141 }
142 142
143 protected virtual void AddHttpHandlers() 143 protected virtual void AddHttpHandlers()
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index bfaf5af..12cb0ea 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -43,8 +43,7 @@ namespace OpenSim
43 protected NetworkServersInfo m_networkServersInfo; 43 protected NetworkServersInfo m_networkServersInfo;
44 44
45 public ConfigurationLoader() 45 public ConfigurationLoader()
46 { 46 {
47
48 } 47 }
49 48
50 public OpenSimConfigSource LoadConfigSettings(IConfigSource configSource, out ConfigSettings configSettings, out NetworkServersInfo networkInfo) 49 public OpenSimConfigSource LoadConfigSettings(IConfigSource configSource, out ConfigSettings configSettings, out NetworkServersInfo networkInfo)
@@ -149,7 +148,9 @@ namespace OpenSim
149 config.Set("userDatabase_plugin", "OpenSim.Data.SQLite.dll"); 148 config.Set("userDatabase_plugin", "OpenSim.Data.SQLite.dll");
150 config.Set("user_source", ""); 149 config.Set("user_source", "");
151 config.Set("asset_plugin", "OpenSim.Data.SQLite.dll"); 150 config.Set("asset_plugin", "OpenSim.Data.SQLite.dll");
152 config.Set("asset_source", ""); 151 config.Set("asset_source", "");
152 config.Set("LibrariesXMLFile", string.Format(".{0}inventory{0}Libraries.xml", Path.DirectorySeparatorChar));
153 config.Set("AssetSetsXMLFile", string.Format(".{0}assets{0}AssetSets.xml", Path.DirectorySeparatorChar));
153 config.Set("dump_assets_to_file", false); 154 config.Set("dump_assets_to_file", false);
154 } 155 }
155 156
@@ -186,7 +187,6 @@ namespace OpenSim
186 m_configSettings.Standalone = !startupConfig.GetBoolean("gridmode", false); 187 m_configSettings.Standalone = !startupConfig.GetBoolean("gridmode", false);
187 m_configSettings.PhysicsEngine = startupConfig.GetString("physics"); 188 m_configSettings.PhysicsEngine = startupConfig.GetString("physics");
188 m_configSettings.MeshEngineName = startupConfig.GetString("meshing"); 189 m_configSettings.MeshEngineName = startupConfig.GetString("meshing");
189
190 m_configSettings.PhysicalPrim = startupConfig.GetBoolean("physical_prim", true); 190 m_configSettings.PhysicalPrim = startupConfig.GetBoolean("physical_prim", true);
191 191
192 m_configSettings.See_into_region_from_neighbor = startupConfig.GetBoolean("see_into_this_sim_from_neighbor", true); 192 m_configSettings.See_into_region_from_neighbor = startupConfig.GetBoolean("see_into_this_sim_from_neighbor", true);
@@ -218,7 +218,10 @@ namespace OpenSim
218 m_configSettings.StandaloneAssetPlugin = standaloneConfig.GetString("asset_plugin"); 218 m_configSettings.StandaloneAssetPlugin = standaloneConfig.GetString("asset_plugin");
219 m_configSettings.StandaloneAssetSource = standaloneConfig.GetString("asset_source"); 219 m_configSettings.StandaloneAssetSource = standaloneConfig.GetString("asset_source");
220 220
221 m_configSettings.DumpAssetsToFile = standaloneConfig.GetBoolean("dump_assets_to_file", false); 221 m_configSettings.LibrariesXMLFile = standaloneConfig.GetString("LibrariesXMLFile");
222 m_configSettings.AssetSetsXMLFile = standaloneConfig.GetString("AssetSetsXMLFile");
223
224 m_configSettings.DumpAssetsToFile = standaloneConfig.GetBoolean("dump_assets_to_file", false);
222 } 225 }
223 226
224 m_networkServersInfo.loadFromConfiguration(m_config.Source); 227 m_networkServersInfo.loadFromConfiguration(m_config.Source);
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 832043d..9031a8b 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -178,7 +178,7 @@ namespace OpenSim
178 178
179 m_stats = StatsManager.StartCollectingSimExtraStats(); 179 m_stats = StatsManager.StartCollectingSimExtraStats();
180 180
181 LibraryRootFolder libraryRootFolder = new LibraryRootFolder(); 181 LibraryRootFolder libraryRootFolder = new LibraryRootFolder(m_configSettings.LibrariesXMLFile);
182 182
183 // StandAlone mode? is determined by !startupConfig.GetBoolean("gridmode", false) 183 // StandAlone mode? is determined by !startupConfig.GetBoolean("gridmode", false)
184 if (m_configSettings.Standalone) 184 if (m_configSettings.Standalone)
@@ -291,7 +291,7 @@ namespace OpenSim
291 else 291 else
292 { 292 {
293 SQLAssetServer sqlAssetServer = new SQLAssetServer(m_configSettings.StandaloneAssetPlugin, m_configSettings.StandaloneAssetSource); 293 SQLAssetServer sqlAssetServer = new SQLAssetServer(m_configSettings.StandaloneAssetPlugin, m_configSettings.StandaloneAssetSource);
294 sqlAssetServer.LoadDefaultAssets(); 294 sqlAssetServer.LoadDefaultAssets(m_configSettings.AssetSetsXMLFile);
295 assetServer = sqlAssetServer; 295 assetServer = sqlAssetServer;
296 } 296 }
297 297
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index bd48f8c..cc117ad 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -178,7 +178,7 @@
178 178
179 ;WorldMapModule = "WorldMap" 179 ;WorldMapModule = "WorldMap"
180 ;MapImageModule = "MapImageModule" 180 ;MapImageModule = "MapImageModule"
181 181
182 182
183[StandAlone] 183[StandAlone]
184 accounts_authenticate = true 184 accounts_authenticate = true
@@ -225,6 +225,14 @@
225 ; User Source MySQL example 225 ; User Source MySQL example
226 ;user_source = "Data Source=localhost;Database=opensim;User ID=opensim;Password=****;" 226 ;user_source = "Data Source=localhost;Database=opensim;User ID=opensim;Password=****;"
227 227
228 ; Specifies the location and filename of the default inventory library control file. The path can be relative or absolute
229 ; Default is ./inventory/Libraries.xml
230 ;LibrariesXMLFile="./inventory/Libraries.xml"
231
232 ; Specifies the location and filename of the inventory library assets control file. The path can be relative or absolute
233 ; Setting is optional. Default is ./assets/AssetSets.xml
234 ;AssetSetsXMLFile="./assets/AssetSets.xml"
235
228 dump_assets_to_file = false 236 dump_assets_to_file = false
229 237
230 238