From 14c587bea1e0acfca0ba1842c5a1fa10bdf45548 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Sun, 13 Jun 2010 21:45:39 +0100
Subject: Thank you, Snoopy2, for a patch to fix RemoteAdmin. Committed with
the following changes: - Start location is NOT optional. The signature was
defined with it being mandataory and there is no reason to change it -
Adjusted comments to remove misleading or no longer true comments. Default is
neuter, according to the code, not male, as the comment stated.
---
.../SimianUserAccountServiceConnector.cs | 2 +-
.../UserAccountService/UserAccountService.cs | 24 ++++++++++++++--------
2 files changed, 16 insertions(+), 10 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
index 874f1a2..56c73ec 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs
index 063251a..326e502 100644
--- a/OpenSim/Services/UserAccountService/UserAccountService.cs
+++ b/OpenSim/Services/UserAccountService/UserAccountService.cs
@@ -357,7 +357,7 @@ namespace OpenSim.Services.UserAccountService
///
///
///
- public void CreateUser(string firstName, string lastName, string password, string email)
+ private void CreateUser(string firstName, string lastName, string password, string email)
{
UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName);
if (null == account)
@@ -374,12 +374,14 @@ namespace OpenSim.Services.UserAccountService
if (StoreUserAccount(account))
{
- bool success = false;
+ bool success;
if (m_AuthenticationService != null)
+ {
success = m_AuthenticationService.SetPassword(account.PrincipalID, password);
- if (!success)
- m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set password for account {0} {1}.",
- firstName, lastName);
+ if (!success)
+ m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set password for account {0} {1}.",
+ firstName, lastName);
+ }
GridRegion home = null;
if (m_GridService != null)
@@ -399,18 +401,22 @@ namespace OpenSim.Services.UserAccountService
firstName, lastName);
if (m_InventoryService != null)
+ {
success = m_InventoryService.CreateUserInventory(account.PrincipalID);
- if (!success)
- m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to create inventory for account {0} {1}.",
- firstName, lastName);
+ if (!success)
+ m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to create inventory for account {0} {1}.",
+ firstName, lastName);
+ }
m_log.InfoFormat("[USER ACCOUNT SERVICE]: Account {0} {1} created successfully", firstName, lastName);
+ } else {
+ m_log.ErrorFormat("[USER ACCOUNT SERVICE]: Account creation failed for account {0} {1}", firstName, lastName);
}
}
else
{
m_log.ErrorFormat("[USER ACCOUNT SERVICE]: A user with the name {0} {1} already exists!", firstName, lastName);
}
- }
+ }
}
}
--
cgit v1.1
From 19558f380a1e9cbaff849eb15262266ea79b60d2 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 13 Jun 2010 19:06:22 -0700
Subject: Fixes the long-standing RegionUp bug! Plus lots of other cleanups
related to neighbours.
---
OpenSim/Services/Connectors/Grid/GridServiceConnector.cs | 9 +++------
.../Services/Connectors/Simulation/SimulationServiceConnector.cs | 2 +-
OpenSim/Services/GridService/GridService.cs | 5 +++--
3 files changed, 7 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
index 0ec8912..1831533 100644
--- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
@@ -210,9 +210,6 @@ namespace OpenSim.Services.Connectors
GridRegion rinfo = new GridRegion((Dictionary)r);
rinfos.Add(rinfo);
}
- else
- m_log.DebugFormat("[GRID CONNECTOR]: GetNeighbours {0}, {1} received invalid response type {2}",
- scopeID, regionID, r.GetType());
}
}
else
@@ -299,9 +296,9 @@ namespace OpenSim.Services.Connectors
{
if (replyData["result"] is Dictionary)
rinfo = new GridRegion((Dictionary)replyData["result"]);
- else
- m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition {0}, {1}-{2} received no region",
- scopeID, x, y);
+ //else
+ // m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition {0}, {1}-{2} received no region",
+ // scopeID, x, y);
}
else
m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition {0}, {1}-{2} received null response",
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index ff0dd7e..32f02fb 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -479,7 +479,7 @@ namespace OpenSim.Services.Connectors.Simulation
}
catch (WebException ex)
{
- m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent delete {0}", ex.Message);
+ m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent delete from {0}: {1}", destination.RegionName, ex.Message);
return false;
}
finally
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 7c98642..225530f 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -273,14 +273,15 @@ namespace OpenSim.Services.GridService
if (region != null)
{
// Not really? Maybe?
- List rdatas = m_Database.Get(region.posX - (int)Constants.RegionSize, region.posY - (int)Constants.RegionSize,
- region.posX + (int)Constants.RegionSize, region.posY + (int)Constants.RegionSize, scopeID);
+ List rdatas = m_Database.Get(region.posX - (int)Constants.RegionSize - 1, region.posY - (int)Constants.RegionSize - 1,
+ region.posX + (int)Constants.RegionSize + 1, region.posY + (int)Constants.RegionSize + 1, scopeID);
foreach (RegionData rdata in rdatas)
if (rdata.RegionID != regionID)
rinfos.Add(RegionData2RegionInfo(rdata));
}
+ m_log.DebugFormat("[GRID SERVICE]: region {0} has {1} neighours", region.RegionName, rinfos.Count);
return rinfos;
}
--
cgit v1.1
From 38f098588cb2227602b8e5a5059d0513195da52f Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 15 Jun 2010 16:36:22 -0700
Subject: Fixes creation date issue on user accounts.
---
OpenSim/Services/Interfaces/IUserAccountService.cs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/Interfaces/IUserAccountService.cs b/OpenSim/Services/Interfaces/IUserAccountService.cs
index 09d1d87..c580078 100644
--- a/OpenSim/Services/Interfaces/IUserAccountService.cs
+++ b/OpenSim/Services/Interfaces/IUserAccountService.cs
@@ -29,6 +29,8 @@ using System;
using System.Collections.Generic;
using OpenMetaverse;
+using OpenSim.Framework;
+
namespace OpenSim.Services.Interfaces
{
public class UserAccount
@@ -50,7 +52,7 @@ namespace OpenSim.Services.Interfaces
LastName = lastName;
Email = email;
ServiceURLs = new Dictionary();
- // Created = ???
+ Created = Util.UnixTimeSinceEpoch();
}
public string FirstName;
--
cgit v1.1
From 6c0a372346305f9de07d664aa58019a6cdfd6c63 Mon Sep 17 00:00:00 2001
From: John Hurliman
Date: Tue, 15 Jun 2010 17:46:36 -0700
Subject: * Support salted and unsalted password hashes in
SimianAuthenticationServiceConnector
---
.../SimianAuthenticationServiceConnector.cs | 53 +++++++++++++++++++---
1 file changed, 46 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
index de3ee4e..3c784f2 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
@@ -114,10 +114,9 @@ namespace OpenSim.Services.Connectors.SimianGrid
{
if (identity["Type"].AsString() == "md5hash")
{
- string credential = identity["Credential"].AsString();
-
- if (password == credential || "$1$" + password == credential || "$1$" + Utils.MD5String(password) == credential || Utils.MD5String(password) == credential)
- return Authorize(principalID);
+ string authorizeResult;
+ if (CheckPassword(principalID, password, identity["Credential"].AsString(), out authorizeResult))
+ return authorizeResult;
md5hashFound = true;
break;
@@ -125,9 +124,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
}
}
- if (md5hashFound)
- m_log.Warn("[SIMIAN AUTH CONNECTOR]: Authentication failed for " + principalID + " using md5hash $1$" + Utils.MD5String(password));
- else
+ if (!md5hashFound)
m_log.Warn("[SIMIAN AUTH CONNECTOR]: Authentication failed for " + principalID + ", no md5hash identity found");
}
else
@@ -228,6 +225,48 @@ namespace OpenSim.Services.Connectors.SimianGrid
return false;
}
+ private bool CheckPassword(UUID userID, string password, string simianGridCredential, out string authorizeResult)
+ {
+ if (simianGridCredential.Contains(":"))
+ {
+ // Salted version
+ int idx = simianGridCredential.IndexOf(':');
+ string finalhash = simianGridCredential.Substring(0, idx);
+ string salt = simianGridCredential.Substring(idx + 1);
+
+ if (finalhash == Utils.MD5String(password + ":" + salt))
+ {
+ authorizeResult = Authorize(userID);
+ return true;
+ }
+ else
+ {
+ m_log.Warn("[SIMIAN AUTH CONNECTOR]: Authentication failed for " + userID +
+ " using md5hash " + Utils.MD5String(password) + ":" + salt);
+ }
+ }
+ else
+ {
+ // Unsalted version
+ if (password == simianGridCredential ||
+ "$1$" + password == simianGridCredential ||
+ "$1$" + Utils.MD5String(password) == simianGridCredential ||
+ Utils.MD5String(password) == simianGridCredential)
+ {
+ authorizeResult = Authorize(userID);
+ return true;
+ }
+ else
+ {
+ m_log.Warn("[SIMIAN AUTH CONNECTOR]: Authentication failed for " + userID +
+ " using md5hash $1$" + Utils.MD5String(password));
+ }
+ }
+
+ authorizeResult = null;
+ return false;
+ }
+
private string Authorize(UUID userID)
{
NameValueCollection requestArgs = new NameValueCollection
--
cgit v1.1