From b82b0b16770af89b0bbe48ba63a0d9fec9839d6d Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 1 Mar 2011 09:20:50 -0800
Subject: Normalizing comparison to lower case, just in case ppl set their
config vars inconsistently. (maybe related to mantis #5386)
---
OpenSim/Services/HypergridService/UserAgentService.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index 3ead180..445d45e 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -253,7 +253,7 @@ namespace OpenSim.Services.HypergridService
TravelingAgentInfo travel = m_TravelingAgents[sessionID];
- return travel.GridExternalName == thisGridExternalName;
+ return travel.GridExternalName.ToLower() == thisGridExternalName.ToLower();
}
public bool VerifyClient(UUID sessionID, string reportedIP)
--
cgit v1.1
From 20aeace8d75fa5a1a3d0ba1d3d9ab6cdad2cf088 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 9 Mar 2011 22:03:12 +0000
Subject: Add log messages on teleport failure to better pin down the cause.
---
.../Services/Connectors/Simulation/SimulationServiceConnector.cs | 6 +++---
OpenSim/Services/Interfaces/ISimulationService.cs | 7 +++++++
2 files changed, 10 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 463b2fb..93b3ae6 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -79,9 +79,6 @@ namespace OpenSim.Services.Connectors.Simulation
return "agent/";
}
- ///
- ///
- ///
public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason)
{
// m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CreateAgent start");
@@ -109,6 +106,9 @@ namespace OpenSim.Services.Connectors.Simulation
if (result["Success"].AsBoolean())
return true;
+ m_log.WarnFormat(
+ "[REMOTE SIMULATION CONNECTOR]: Failed to create agent {0} {1} at remote simulator {1}",
+ aCircuit.firstname, aCircuit.lastname, destination.RegionName);
reason = result["Message"] != null ? result["Message"].AsString() : "error";
return false;
}
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index b796757..55c9cc5 100644
--- a/OpenSim/Services/Interfaces/ISimulationService.cs
+++ b/OpenSim/Services/Interfaces/ISimulationService.cs
@@ -40,6 +40,13 @@ namespace OpenSim.Services.Interfaces
#region Agents
+ ///
+ /// Ask the simulator hosting the destination to create an agent on that region.
+ ///
+ ///
+ ///
+ ///
+ /// Reason message in the event of a failure.
bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason);
///
--
cgit v1.1
From d3a20a1e9257ecec417e219ebaf079370015f06d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 21 Mar 2011 21:37:06 +0000
Subject: On initial region registration, if the user chooses the option to
make the region part of an existing estate, then list the existing region
names.
---
OpenSim/Services/Connectors/Simulation/EstateDataService.cs | 10 ++++++++++
1 file changed, 10 insertions(+)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs
index b6df5a2..d0588bf 100644
--- a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs
+++ b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs
@@ -90,6 +90,11 @@ namespace OpenSim.Services.Connectors
{
return m_database.LoadEstateSettings(estateID);
}
+
+ public List LoadEstateSettingsAll()
+ {
+ return m_database.LoadEstateSettingsAll();
+ }
public void StoreEstateSettings(EstateSettings es)
{
@@ -100,6 +105,11 @@ namespace OpenSim.Services.Connectors
{
return m_database.GetEstates(search);
}
+
+ public List GetEstatesAll()
+ {
+ return m_database.GetEstatesAll();
+ }
public bool LinkRegion(UUID regionID, int estateID)
{
--
cgit v1.1
From 482686daab055d4d2d878b238059b442e64122f4 Mon Sep 17 00:00:00 2001
From: SignpostMarv Martin
Date: Tue, 15 Mar 2011 10:29:24 +0000
Subject: WebkeyAuthenticationService is now no longer a stub!
Signed-off-by: SignpostMarv Martin
---
.../WebkeyAuthenticationService.cs | 40 +++++++++++++++++++---
1 file changed, 35 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs
index d1a5b0f..a072958 100644
--- a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs
@@ -31,6 +31,9 @@ using OpenSim.Services.Interfaces;
using log4net;
using Nini.Config;
using System.Reflection;
+using OpenSim.Data;
+using OpenSim.Framework;
+using OpenSim.Framework.Console;
namespace OpenSim.Services.AuthenticationService
{
@@ -43,17 +46,44 @@ namespace OpenSim.Services.AuthenticationService
public class WebkeyAuthenticationService :
AuthenticationServiceBase, IAuthenticationService
{
-// private static readonly ILog m_log =
-// LogManager.GetLogger(
-// MethodBase.GetCurrentMethod().DeclaringType);
-
+ private static readonly ILog m_log =
+ LogManager.GetLogger(
+ MethodBase.GetCurrentMethod().DeclaringType);
+
public WebkeyAuthenticationService(IConfigSource config) :
- base(config)
+ base(config)
{
}
public string Authenticate(UUID principalID, string password, int lifetime)
{
+ m_log.InfoFormat("[Authenticate]: Trying a web key authenticate");
+ if (new UUID(password) == UUID.Zero)
+ {
+ m_log.InfoFormat("[Authenticate]: NULL_KEY is not a valid web_login_key");
+ }
+ else
+ {
+ AuthenticationData data = m_Database.Get(principalID);
+ if (data != null && data.Data != null)
+ {
+ if (data.Data.ContainsKey("webLoginKey"))
+ {
+ m_log.InfoFormat("[Authenticate]: Trying a web key authentication");
+ string key = data.Data["webLoginKey"].ToString();
+ m_log.DebugFormat("[WEB LOGIN AUTH]: got {0} for key in db vs {1}", key, password);
+ if (key == password)
+ {
+ data.Data["webLoginKey"] = UUID.Zero.ToString();
+ m_Database.Store(data);
+ return GetToken(principalID, lifetime);
+ }
+ }else{
+ m_log.InfoFormat("[Authenticate]: no col webLoginKey in passwd.db");
+ }
+ }
+ m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID);
+ }
return String.Empty;
}
}
--
cgit v1.1
From af3956348fc58613948889e5f85030a454684970 Mon Sep 17 00:00:00 2001
From: SignpostMarv Martin
Date: Tue, 15 Mar 2011 10:29:42 +0000
Subject: Adding a combined auth service, allowing users to login with either
web login or password
Signed-off-by: SignpostMarv Martin
---
.../WebkeyOrPasswordAuthenticationService.cs | 65 ++++++++++++++++++++++
1 file changed, 65 insertions(+)
create mode 100644 OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
new file mode 100644
index 0000000..0f2fd93
--- /dev/null
+++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
@@ -0,0 +1,65 @@
+using System;
+using System.Collections.Generic;
+using OpenMetaverse;
+using OpenSim.Services.Interfaces;
+using log4net;
+using Nini.Config;
+using System.Reflection;
+using OpenSim.Data;
+using OpenSim.Framework;
+using OpenSim.Framework.Console;
+
+namespace OpenSim.Services.AuthenticationService
+{
+ public class WebkeyOrPasswordAuthenticationService : AuthenticationServiceBase, IAuthenticationService
+ {
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+ public WebkeyOrPasswordAuthenticationService(IConfigSource config)
+ : base(config)
+ {
+ }
+
+ public string Authenticate(UUID principalID, string password, int lifetime)
+ {
+ AuthenticationData data = m_Database.Get(principalID);
+ if (data != null && data.Data != null)
+ {
+ if (data.Data.ContainsKey("webLoginKey"))
+ {
+ m_log.InfoFormat("[Authenticate]: Trying a web key authentication");
+ if (new UUID(password) == UUID.Zero)
+ {
+ m_log.InfoFormat("[Authenticate]: NULL_KEY is not a valid web_login_key");
+ }
+ else
+ {
+ string key = data.Data["webLoginKey"].ToString();
+ m_log.DebugFormat("[WEB LOGIN AUTH]: got {0} for key in db vs {1}", key, password);
+ if (key == password)
+ {
+ data.Data["webLoginKey"] = UUID.Zero.ToString();
+ m_Database.Store(data);
+ return GetToken(principalID, lifetime);
+ }
+ }
+ }
+ if (data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt"))
+ {
+ m_log.InfoFormat("[Authenticate]: Trying a password authentication");
+ string hashed = Util.Md5Hash(password + ":" + data.Data["passwordSalt"].ToString());
+ m_log.DebugFormat("[PASS AUTH]: got {0}; hashed = {1}; stored = {2}", password, hashed, data.Data["passwordHash"].ToString());
+ if (data.Data["passwordHash"].ToString() == hashed)
+ {
+ return GetToken(principalID, lifetime);
+ }
+ }
+ m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based login failed for PrincipalID {0}", principalID);
+ }
+ else
+ {
+ m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID);
+ }
+ return string.Empty;
+ }
+ }
+}
--
cgit v1.1
From 0e808950fbb54271d478d29669bf035949731114 Mon Sep 17 00:00:00 2001
From: SignpostMarv Martin
Date: Mon, 21 Mar 2011 14:47:10 +0000
Subject: InfoFormat > DebugFormat
Signed-off-by: SignpostMarv Martin
---
OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs
index a072958..5924026 100644
--- a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Services.AuthenticationService
return GetToken(principalID, lifetime);
}
}else{
- m_log.InfoFormat("[Authenticate]: no col webLoginKey in passwd.db");
+ m_log.DebugFormat("[Authenticate]: no col webLoginKey in passwd.db");
}
}
m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID);
--
cgit v1.1
From 3bc859a834c50634281df3d52166fc68d7c3c3ba Mon Sep 17 00:00:00 2001
From: SignpostMarv Martin
Date: Mon, 21 Mar 2011 15:42:57 +0000
Subject: Making combined auth service re-use the existing auth services
instead of duplicating code
Signed-off-by: SignpostMarv Martin
---
.../WebkeyOrPasswordAuthenticationService.cs | 40 ++++++++++------------
1 file changed, 19 insertions(+), 21 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
index 0f2fd93..b8bb090 100644
--- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
@@ -8,58 +8,56 @@ using System.Reflection;
using OpenSim.Data;
using OpenSim.Framework;
using OpenSim.Framework.Console;
+using OpenSim.Server.Base;
namespace OpenSim.Services.AuthenticationService
{
public class WebkeyOrPasswordAuthenticationService : AuthenticationServiceBase, IAuthenticationService
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+ private IConfigSource config;
public WebkeyOrPasswordAuthenticationService(IConfigSource config)
: base(config)
{
+ this.config = config;
}
public string Authenticate(UUID principalID, string password, int lifetime)
{
AuthenticationData data = m_Database.Get(principalID);
+ IAuthenticationService svc;
+ Object[] args = new Object[] { config };
+ string result = String.Empty;
if (data != null && data.Data != null)
{
if (data.Data.ContainsKey("webLoginKey"))
{
- m_log.InfoFormat("[Authenticate]: Trying a web key authentication");
- if (new UUID(password) == UUID.Zero)
+ svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "WebkeyAuthenticationService", args);
+ result = svc.Authenticate(principalID, password, lifetime);
+ if (result == String.Empty)
{
- m_log.InfoFormat("[Authenticate]: NULL_KEY is not a valid web_login_key");
- }
- else
- {
- string key = data.Data["webLoginKey"].ToString();
- m_log.DebugFormat("[WEB LOGIN AUTH]: got {0} for key in db vs {1}", key, password);
- if (key == password)
- {
- data.Data["webLoginKey"] = UUID.Zero.ToString();
- m_Database.Store(data);
- return GetToken(principalID, lifetime);
- }
+ m_log.DebugFormat("[Authenticate]: Web Login failed for PrincipalID {0}", principalID);
}
}
if (data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt"))
{
- m_log.InfoFormat("[Authenticate]: Trying a password authentication");
- string hashed = Util.Md5Hash(password + ":" + data.Data["passwordSalt"].ToString());
- m_log.DebugFormat("[PASS AUTH]: got {0}; hashed = {1}; stored = {2}", password, hashed, data.Data["passwordHash"].ToString());
- if (data.Data["passwordHash"].ToString() == hashed)
+ svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "PasswordAuthenticationService", args);
+ result = svc.Authenticate(principalID, password, lifetime);
+ if (result == String.Empty)
{
- return GetToken(principalID, lifetime);
+ m_log.DebugFormat("[Authenticate]: Password login failed for PrincipalID {0}", principalID);
}
}
- m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based login failed for PrincipalID {0}", principalID);
+ if (result == string.Empty)
+ {
+ m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based login failed for PrincipalID {0}", principalID);
+ }
}
else
{
m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID);
}
- return string.Empty;
+ return result;
}
}
}
--
cgit v1.1
From e93531e1240348f18abb4ef88a0def227026e8f3 Mon Sep 17 00:00:00 2001
From: SignpostMarv Martin
Date: Thu, 24 Mar 2011 16:21:12 +0000
Subject: Fixing bug that occurs when using web login- the result was not
checked
---
.../AuthenticationService/WebkeyOrPasswordAuthenticationService.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
index b8bb090..3a47e97 100644
--- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Services.AuthenticationService
m_log.DebugFormat("[Authenticate]: Web Login failed for PrincipalID {0}", principalID);
}
}
- if (data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt"))
+ if (result == string.Empty && data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt"))
{
svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "PasswordAuthenticationService", args);
result = svc.Authenticate(principalID, password, lifetime);
--
cgit v1.1
From 3f4be42a87f77d5da7e6cafd4fb98ff6a502636d Mon Sep 17 00:00:00 2001
From: SignpostMarv Martin
Date: Thu, 24 Mar 2011 16:46:21 +0000
Subject: Altering log feedback
---
.../WebkeyAuthenticationService.cs | 23 +++++++++++-----------
.../WebkeyOrPasswordAuthenticationService.cs | 8 +++++---
2 files changed, 17 insertions(+), 14 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs
index 5924026..2344c0e 100644
--- a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs
@@ -57,10 +57,9 @@ namespace OpenSim.Services.AuthenticationService
public string Authenticate(UUID principalID, string password, int lifetime)
{
- m_log.InfoFormat("[Authenticate]: Trying a web key authenticate");
if (new UUID(password) == UUID.Zero)
{
- m_log.InfoFormat("[Authenticate]: NULL_KEY is not a valid web_login_key");
+ m_log.DebugFormat("[AUTH SERVICE]: UUID.Zero is not a valid web_login_key on PrincipalID {0}", principalID);
}
else
{
@@ -69,17 +68,19 @@ namespace OpenSim.Services.AuthenticationService
{
if (data.Data.ContainsKey("webLoginKey"))
{
- m_log.InfoFormat("[Authenticate]: Trying a web key authentication");
string key = data.Data["webLoginKey"].ToString();
- m_log.DebugFormat("[WEB LOGIN AUTH]: got {0} for key in db vs {1}", key, password);
- if (key == password)
- {
- data.Data["webLoginKey"] = UUID.Zero.ToString();
- m_Database.Store(data);
- return GetToken(principalID, lifetime);
- }
+ if (key == password)
+ {
+ data.Data["webLoginKey"] = UUID.Zero.ToString();
+ m_Database.Store(data);
+ return GetToken(principalID, lifetime);
+ }
+ else
+ {
+ m_log.DebugFormat("[AUTH SERVICE]: web login auth failed, got PrincipalID {0} gave {1} instead of {2}", principalID, password, key);
+ }
}else{
- m_log.DebugFormat("[Authenticate]: no col webLoginKey in passwd.db");
+ m_log.DebugFormat("[AUTH SERVICE]: no col webLoginKey in passwd.db");
}
}
m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID);
diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
index 3a47e97..c315ef2 100644
--- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
@@ -32,25 +32,27 @@ namespace OpenSim.Services.AuthenticationService
{
if (data.Data.ContainsKey("webLoginKey"))
{
+ m_log.DebugFormat("[AUTH SERVICE]: Attempting web key authentication for PrincipalID {0}", principalID);
svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "WebkeyAuthenticationService", args);
result = svc.Authenticate(principalID, password, lifetime);
if (result == String.Empty)
{
- m_log.DebugFormat("[Authenticate]: Web Login failed for PrincipalID {0}", principalID);
+ m_log.DebugFormat("[AUTH SERVICE]: Web Login failed for PrincipalID {0}", principalID);
}
}
if (result == string.Empty && data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt"))
{
+ m_log.DebugFormat("[AUTH SERVICE]: Attempting password authentication for PrincipalID {0}", principalID);
svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "PasswordAuthenticationService", args);
result = svc.Authenticate(principalID, password, lifetime);
if (result == String.Empty)
{
- m_log.DebugFormat("[Authenticate]: Password login failed for PrincipalID {0}", principalID);
+ m_log.DebugFormat("[AUTH SERVICE]: Password login failed for PrincipalID {0}", principalID);
}
}
if (result == string.Empty)
{
- m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based login failed for PrincipalID {0}", principalID);
+ m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based authentication failed for PrincipalID {0}", principalID);
}
}
else
--
cgit v1.1
From 361b3e7ab8313b89475bc644fdcd348e071b951a Mon Sep 17 00:00:00 2001
From: SignpostMarv Martin
Date: Thu, 24 Mar 2011 17:04:29 +0000
Subject: Removing hard-coded plugin loading in favour of direct class
instantiation
---
.../WebkeyOrPasswordAuthenticationService.cs | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
index c315ef2..15dc5be 100644
--- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
@@ -16,25 +16,25 @@ namespace OpenSim.Services.AuthenticationService
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private IConfigSource config;
+ private Dictionary svc_checks;
public WebkeyOrPasswordAuthenticationService(IConfigSource config)
: base(config)
{
this.config = config;
+ svc_checks["web_login_key"] = new WebkeyAuthenticationService(config);
+ svc_checks["password"] = new PasswordAuthenticationService(config);
}
public string Authenticate(UUID principalID, string password, int lifetime)
{
AuthenticationData data = m_Database.Get(principalID);
- IAuthenticationService svc;
- Object[] args = new Object[] { config };
string result = String.Empty;
if (data != null && data.Data != null)
{
if (data.Data.ContainsKey("webLoginKey"))
{
m_log.DebugFormat("[AUTH SERVICE]: Attempting web key authentication for PrincipalID {0}", principalID);
- svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "WebkeyAuthenticationService", args);
- result = svc.Authenticate(principalID, password, lifetime);
+ result = svc_checks["web_login_key"].Authenticate(principalID, password, lifetime);
if (result == String.Empty)
{
m_log.DebugFormat("[AUTH SERVICE]: Web Login failed for PrincipalID {0}", principalID);
@@ -43,8 +43,7 @@ namespace OpenSim.Services.AuthenticationService
if (result == string.Empty && data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt"))
{
m_log.DebugFormat("[AUTH SERVICE]: Attempting password authentication for PrincipalID {0}", principalID);
- svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "PasswordAuthenticationService", args);
- result = svc.Authenticate(principalID, password, lifetime);
+ result = svc_checks["password"].Authenticate(principalID, password, lifetime);
if (result == String.Empty)
{
m_log.DebugFormat("[AUTH SERVICE]: Password login failed for PrincipalID {0}", principalID);
--
cgit v1.1
From de0730a54ca8b2ede0727212bfc2474c0eff979f Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 26 Mar 2011 02:42:50 +0000
Subject: Add OpenSim.Server.Base reference in prebuild.xml. Initialize
svc_checks dictionary in WebkeyOrPasswordAuthenticationService, which was
what was causing the load failure.
---
.../AuthenticationService/WebkeyOrPasswordAuthenticationService.cs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
index 15dc5be..bcfd03d 100644
--- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
@@ -15,8 +15,11 @@ namespace OpenSim.Services.AuthenticationService
public class WebkeyOrPasswordAuthenticationService : AuthenticationServiceBase, IAuthenticationService
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
private IConfigSource config;
- private Dictionary svc_checks;
+ private Dictionary svc_checks
+ = new Dictionary();
+
public WebkeyOrPasswordAuthenticationService(IConfigSource config)
: base(config)
{
--
cgit v1.1
From 83f48c26d62b148c11776af6d4947fc2397a675d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 26 Mar 2011 02:43:41 +0000
Subject: add header file
---
.../WebkeyOrPasswordAuthenticationService.cs | 29 +++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
index bcfd03d..00056a6 100644
--- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
@@ -1,4 +1,31 @@
-using System;
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Services.Interfaces;
--
cgit v1.1
From 797128a6ad89ea4944074f99db0a30ad7a5e7a3d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 26 Mar 2011 02:44:46 +0000
Subject: Rename some member fields to standard m_ OpenSim code convention
---
.../WebkeyOrPasswordAuthenticationService.cs | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
index 00056a6..3590e12 100644
--- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
@@ -43,16 +43,16 @@ namespace OpenSim.Services.AuthenticationService
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
- private IConfigSource config;
- private Dictionary svc_checks
+ private IConfigSource m_config;
+ private Dictionary m_svcChecks
= new Dictionary();
public WebkeyOrPasswordAuthenticationService(IConfigSource config)
: base(config)
{
- this.config = config;
- svc_checks["web_login_key"] = new WebkeyAuthenticationService(config);
- svc_checks["password"] = new PasswordAuthenticationService(config);
+ this.m_config = config;
+ m_svcChecks["web_login_key"] = new WebkeyAuthenticationService(config);
+ m_svcChecks["password"] = new PasswordAuthenticationService(config);
}
public string Authenticate(UUID principalID, string password, int lifetime)
@@ -64,7 +64,7 @@ namespace OpenSim.Services.AuthenticationService
if (data.Data.ContainsKey("webLoginKey"))
{
m_log.DebugFormat("[AUTH SERVICE]: Attempting web key authentication for PrincipalID {0}", principalID);
- result = svc_checks["web_login_key"].Authenticate(principalID, password, lifetime);
+ result = m_svcChecks["web_login_key"].Authenticate(principalID, password, lifetime);
if (result == String.Empty)
{
m_log.DebugFormat("[AUTH SERVICE]: Web Login failed for PrincipalID {0}", principalID);
@@ -73,7 +73,7 @@ namespace OpenSim.Services.AuthenticationService
if (result == string.Empty && data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt"))
{
m_log.DebugFormat("[AUTH SERVICE]: Attempting password authentication for PrincipalID {0}", principalID);
- result = svc_checks["password"].Authenticate(principalID, password, lifetime);
+ result = m_svcChecks["password"].Authenticate(principalID, password, lifetime);
if (result == String.Empty)
{
m_log.DebugFormat("[AUTH SERVICE]: Password login failed for PrincipalID {0}", principalID);
@@ -91,4 +91,4 @@ namespace OpenSim.Services.AuthenticationService
return result;
}
}
-}
+}
\ No newline at end of file
--
cgit v1.1
From 2d209d3844a58a4d27fe15aa5ccd497bbd530707 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 28 Mar 2011 16:46:04 -0700
Subject: Fix mantis #5413. WARNING: new config variable in section
[GridService] of the simulators called Gatekeeper -- intended to have the URL
of the grid's Gatekeeper service (so that it can be checked against). See
ini.examples.
---
OpenSim/Services/GridService/HypergridLinker.cs | 10 ++++++++++
1 file changed, 10 insertions(+)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index 12ea453..585d088 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -65,6 +65,7 @@ namespace OpenSim.Services.GridService
protected UUID m_ScopeID = UUID.Zero;
protected bool m_Check4096 = true;
protected string m_MapTileDirectory = string.Empty;
+ protected string m_ThisGatekeeper = string.Empty;
// Hyperlink regions are hyperlinks on the map
public readonly Dictionary m_HyperlinkRegions = new Dictionary();
@@ -123,6 +124,8 @@ namespace OpenSim.Services.GridService
m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles");
+ m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", string.Empty);
+
m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService);
m_log.Debug("[HYPERGRID LINKER]: Loaded all services...");
@@ -266,6 +269,13 @@ namespace OpenSim.Services.GridService
regInfo.ScopeID = scopeID;
regInfo.EstateOwner = ownerID;
+ // Make sure we're not hyperlinking to regions on this grid!
+ if (regInfo.ServerURI.Trim(new char[]{'/', ' '}) == m_ThisGatekeeper.Trim(new char[]{'/', ' '}))
+ {
+ reason = "Cannot hyperlink to regions on the same grid";
+ return false;
+ }
+
// Check for free coordinates
GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY);
if (region != null)
--
cgit v1.1
From 309eb712a32fe14f593941b9f0a5ce41f10bcd7f Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 28 Mar 2011 19:34:55 -0700
Subject: Improvement over 2 commits ago: make the hyperlink check understand
port 80.
---
OpenSim/Services/GridService/HypergridLinker.cs | 33 ++++++++++++++++++++++---
1 file changed, 29 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index 585d088..c539047 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -66,6 +66,7 @@ namespace OpenSim.Services.GridService
protected bool m_Check4096 = true;
protected string m_MapTileDirectory = string.Empty;
protected string m_ThisGatekeeper = string.Empty;
+ protected Uri m_ThisGatekeeperURI = null;
// Hyperlink regions are hyperlinks on the map
public readonly Dictionary m_HyperlinkRegions = new Dictionary();
@@ -125,6 +126,14 @@ namespace OpenSim.Services.GridService
m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles");
m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", string.Empty);
+ try
+ {
+ m_ThisGatekeeperURI = new Uri(m_ThisGatekeeper);
+ }
+ catch
+ {
+ m_log.WarnFormat("[HYPERGRID LINKER]: Malformed URL in [GridService], variable Gatekeeper = {0}", m_ThisGatekeeper);
+ }
m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService);
@@ -249,6 +258,8 @@ namespace OpenSim.Services.GridService
remoteRegionName, xloc / Constants.RegionSize, yloc / Constants.RegionSize);
reason = string.Empty;
+ Uri uri = null;
+
regInfo = new GridRegion();
if ( externalPort > 0)
regInfo.HttpPort = externalPort;
@@ -259,8 +270,17 @@ namespace OpenSim.Services.GridService
else
regInfo.ExternalHostName = "0.0.0.0";
if ( serverURI != null)
+ {
regInfo.ServerURI = serverURI;
-
+ try
+ {
+ uri = new Uri(serverURI);
+ regInfo.ExternalHostName = uri.Host;
+ regInfo.HttpPort = (uint)uri.Port;
+ }
+ catch {}
+ }
+
if ( remoteRegionName != string.Empty )
regInfo.RegionName = remoteRegionName;
@@ -270,11 +290,16 @@ namespace OpenSim.Services.GridService
regInfo.EstateOwner = ownerID;
// Make sure we're not hyperlinking to regions on this grid!
- if (regInfo.ServerURI.Trim(new char[]{'/', ' '}) == m_ThisGatekeeper.Trim(new char[]{'/', ' '}))
+ if (m_ThisGatekeeperURI != null)
{
- reason = "Cannot hyperlink to regions on the same grid";
- return false;
+ if (regInfo.ExternalHostName == m_ThisGatekeeperURI.Host && regInfo.HttpPort == m_ThisGatekeeperURI.Port)
+ {
+ reason = "Cannot hyperlink to regions on the same grid";
+ return false;
+ }
}
+ else
+ m_log.WarnFormat("[HYPERGRID LINKER]: Please set this grid's Gatekeeper's address in [GridService]!");
// Check for free coordinates
GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY);
--
cgit v1.1
From f58941e89f122c2e1fd54a2f817fb8114e6c80ed Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 5 Apr 2011 01:30:13 +0100
Subject: Make the "All Estates" option work from the client (this makes chosen
changes to all the estates that the user owns).
This applies to adding/removing estate users, groups, managers and bans.
This is the application of the AllEstates_0.5.patch from http://opensimulator.org/mantis/view.php?id=5420
Thanks very much, Snoopy!
---
OpenSim/Services/Connectors/Simulation/EstateDataService.cs | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs
index d0588bf..7184ba1 100644
--- a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs
+++ b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs
@@ -111,6 +111,11 @@ namespace OpenSim.Services.Connectors
return m_database.GetEstatesAll();
}
+ public List GetEstatesByOwner(UUID ownerID)
+ {
+ return m_database.GetEstatesByOwner(ownerID);
+ }
+
public bool LinkRegion(UUID regionID, int estateID)
{
return m_database.LinkRegion(regionID, estateID);
--
cgit v1.1