aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorBlueWall2015-02-27 12:27:10 -0500
committerBlueWall2015-02-27 12:27:10 -0500
commitaeb8a4bf85816595c9c2ba82413e309e7aa69062 (patch)
tree5e57ea2c030b12916885d0b84da90b5440db37e8 /OpenSim/Region/ScriptEngine
parentAdding dynamic ossl permission control (diff)
downloadopensim-SC-aeb8a4bf85816595c9c2ba82413e309e7aa69062.zip
opensim-SC-aeb8a4bf85816595c9c2ba82413e309e7aa69062.tar.gz
opensim-SC-aeb8a4bf85816595c9c2ba82413e309e7aa69062.tar.bz2
opensim-SC-aeb8a4bf85816595c9c2ba82413e309e7aa69062.tar.xz
Revert "Adding dynamic ossl permission control"
This reverts commit a3681f3052fb5e98e31e7051329a5b748a8bdd8d until further testing. Jenkins now fails ossl tests.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs44
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs10
3 files changed, 0 insertions, 58 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index f4bc45f..10ddf14 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -264,9 +264,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
264 // or a string explaining why this function can't be used. 264 // or a string explaining why this function can't be used.
265 private string CheckThreatLevelTest(ThreatLevel level, string function) 265 private string CheckThreatLevelTest(ThreatLevel level, string function)
266 { 266 {
267 if(GetDynaPerms(m_item.CreatorID, m_item.OwnerID, m_item.GroupID, function))
268 return string.Empty;
269
270 if (!m_FunctionPerms.ContainsKey(function)) 267 if (!m_FunctionPerms.ContainsKey(function))
271 { 268 {
272 FunctionPerms perms = new FunctionPerms(); 269 FunctionPerms perms = new FunctionPerms();
@@ -434,47 +431,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
434 System.Threading.Thread.Sleep(delay); 431 System.Threading.Thread.Sleep(delay);
435 } 432 }
436 433
437 private bool GetDynaPerms(UUID owner, UUID creator, UUID group, string function)
438 {
439 if (World.GetOsslPerms(owner, function))
440 return true;
441 if (World.GetOsslPerms(creator, function))
442 return true;
443 if (World.GetOsslPerms(creator, function))
444 return true;
445
446 return false;
447
448 }
449
450 public void osGrantScriptPermissions(LSL_Key avatar, LSL_List osfunctions)
451 {
452 CheckThreatLevel(ThreatLevel.Severe, "osGrantScriptPermissions");
453 m_host.AddScriptLPS(1);
454 UUID key;
455 UUID.TryParse(avatar.m_string, out key);
456
457 for (int item = 0; item <= osfunctions.Length - 1; item++)
458 {
459 string function = osfunctions.GetLSLStringItem(item);
460 World.AddOsslPerm(key, function);
461 }
462 }
463
464 public void osRevokeScriptPermissions (LSL_Key avatar, LSL_List osfunctions)
465 {
466 CheckThreatLevel(ThreatLevel.Severe, "osRevokeScriptPermissions");
467 m_host.AddScriptLPS(1);
468 UUID key;
469 UUID.TryParse(avatar.m_string, out key);
470
471 for (int item = 0; item <= osfunctions.Length - 1; item++)
472 {
473 string function = osfunctions.GetLSLStringItem(item);
474 World.RemoveOsslPerm(key, function);
475 }
476 }
477
478 public LSL_Integer osSetTerrainHeight(int x, int y, double val) 434 public LSL_Integer osSetTerrainHeight(int x, int y, double val)
479 { 435 {
480 CheckThreatLevel(ThreatLevel.High, "osSetTerrainHeight"); 436 CheckThreatLevel(ThreatLevel.High, "osSetTerrainHeight");
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 2cbaf5a..38d4574 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -116,10 +116,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
116 { 116 {
117 void CheckThreatLevel(ThreatLevel level, string function); 117 void CheckThreatLevel(ThreatLevel level, string function);
118 118
119 // Scripted Script Permissions
120 void osGrantScriptPermissions(LSL_Key avatar, LSL_List functions);
121 void osRevokeScriptPermissions(LSL_Key avatar, LSL_List functions);
122
123 //OpenSim functions 119 //OpenSim functions
124 string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer); 120 string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer);
125 string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, 121 string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index a98f6ac..352a35d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -61,16 +61,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
61 Prim = new OSSLPrim(this); 61 Prim = new OSSLPrim(this);
62 } 62 }
63 63
64 public void osGrantScriptPermissions (LSL_Key avatar, LSL_List osfunctions)
65 {
66 m_OSSL_Functions.osGrantScriptPermissions(avatar, osfunctions);
67 }
68
69 public void osRevokeScriptPermissions (LSL_Key avatar, LSL_List osfunctions)
70 {
71 m_OSSL_Functions.osRevokeScriptPermissions(avatar, osfunctions);
72 }
73
74 public void osSetRegionWaterHeight(double height) 64 public void osSetRegionWaterHeight(double height)
75 { 65 {
76 m_OSSL_Functions.osSetRegionWaterHeight(height); 66 m_OSSL_Functions.osSetRegionWaterHeight(height);