aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs35
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs6
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs62
-rw-r--r--OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs13
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs12
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs2
-rw-r--r--OpenSim/Services/UserAccountService/UserAccountService.cs8
8 files changed, 78 insertions, 62 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 850474d..41e41e4 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -513,6 +513,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
513 byte flags = buffer.Data[0]; 513 byte flags = buffer.Data[0];
514 bool isResend = (flags & Helpers.MSG_RESENT) != 0; 514 bool isResend = (flags & Helpers.MSG_RESENT) != 0;
515 bool isReliable = (flags & Helpers.MSG_RELIABLE) != 0; 515 bool isReliable = (flags & Helpers.MSG_RELIABLE) != 0;
516 bool isZerocoded = (flags & Helpers.MSG_ZEROCODED) != 0;
516 LLUDPClient udpClient = outgoingPacket.Client; 517 LLUDPClient udpClient = outgoingPacket.Client;
517 518
518 if (!udpClient.IsConnected) 519 if (!udpClient.IsConnected)
@@ -522,23 +523,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
522 523
523 int dataLength = buffer.DataLength; 524 int dataLength = buffer.DataLength;
524 525
525 // Keep appending ACKs until there is no room left in the buffer or there are 526 // NOTE: I'm seeing problems with some viewers when ACKs are appended to zerocoded packets so I've disabled that here
526 // no more ACKs to append 527 if (!isZerocoded)
527 uint ackCount = 0;
528 uint ack;
529 while (dataLength + 5 < buffer.Data.Length && udpClient.PendingAcks.Dequeue(out ack))
530 { 528 {
531 Utils.UIntToBytesBig(ack, buffer.Data, dataLength); 529 // Keep appending ACKs until there is no room left in the buffer or there are
532 dataLength += 4; 530 // no more ACKs to append
533 ++ackCount; 531 uint ackCount = 0;
534 } 532 uint ack;
533 while (dataLength + 5 < buffer.Data.Length && udpClient.PendingAcks.Dequeue(out ack))
534 {
535 Utils.UIntToBytesBig(ack, buffer.Data, dataLength);
536 dataLength += 4;
537 ++ackCount;
538 }
535 539
536 if (ackCount > 0) 540 if (ackCount > 0)
537 { 541 {
538 // Set the last byte of the packet equal to the number of appended ACKs 542 // Set the last byte of the packet equal to the number of appended ACKs
539 buffer.Data[dataLength++] = (byte)ackCount; 543 buffer.Data[dataLength++] = (byte)ackCount;
540 // Set the appended ACKs flag on this packet 544 // Set the appended ACKs flag on this packet
541 buffer.Data[0] = (byte)(buffer.Data[0] | Helpers.MSG_APPENDED_ACKS); 545 buffer.Data[0] = (byte)(buffer.Data[0] | Helpers.MSG_APPENDED_ACKS);
546 }
542 } 547 }
543 548
544 buffer.DataLength = dataLength; 549 buffer.DataLength = dataLength;
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
index 488dbd5..3321b38 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
@@ -144,6 +144,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
144 return account; 144 return account;
145 } 145 }
146 146
147 public override bool StoreUserAccount(UserAccount data)
148 {
149 // This remote connector refuses to serve this method
150 return false;
151 }
152
147 #endregion 153 #endregion
148 } 154 }
149} 155}
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 5328d7a..e5dab93 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -600,14 +600,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
600 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID) 600 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID)
601 { 601 {
602 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 602 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
603 List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID); 603 List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID);
604 604
605 if (m_debugEnabled) 605 if (m_debugEnabled)
606 { 606 {
607 foreach (GroupMembersData member in data) 607 foreach (GroupMembersData member in data)
608 { 608 {
609 m_log.DebugFormat("[GROUPS]: Member({0}) - IsOwner({1})", member.AgentID, member.IsOwner); 609 m_log.DebugFormat("[GROUPS]: Member({0}) - IsOwner({1})", member.AgentID, member.IsOwner);
610 } 610 }
611 } 611 }
612 612
613 return data; 613 return data;
@@ -627,14 +627,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
627 { 627 {
628 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 628 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
629 629
630 List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(GetRequestingAgentID(remoteClient), groupID); 630 List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(GetRequestingAgentID(remoteClient), groupID);
631 631
632 if (m_debugEnabled) 632 if (m_debugEnabled)
633 { 633 {
634 foreach (GroupRoleMembersData member in data) 634 foreach (GroupRoleMembersData member in data)
635 { 635 {
636 m_log.DebugFormat("[GROUPS]: Member({0}) - Role({1})", member.MemberID, member.RoleID); 636 m_log.DebugFormat("[GROUPS]: Member({0}) - Role({1})", member.MemberID, member.RoleID);
637 } 637 }
638 } 638 }
639 return data; 639 return data;
640 } 640 }
@@ -1143,11 +1143,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1143 OSDMap llDataStruct = new OSDMap(3); 1143 OSDMap llDataStruct = new OSDMap(3);
1144 llDataStruct.Add("AgentData", AgentData); 1144 llDataStruct.Add("AgentData", AgentData);
1145 llDataStruct.Add("GroupData", GroupData); 1145 llDataStruct.Add("GroupData", GroupData);
1146 llDataStruct.Add("NewGroupData", NewGroupData); 1146 llDataStruct.Add("NewGroupData", NewGroupData);
1147 1147
1148 if (m_debugEnabled) 1148 if (m_debugEnabled)
1149 { 1149 {
1150 m_log.InfoFormat("[GROUPS]: {0}", OSDParser.SerializeJsonString(llDataStruct)); 1150 m_log.InfoFormat("[GROUPS]: {0}", OSDParser.SerializeJsonString(llDataStruct));
1151 } 1151 }
1152 1152
1153 IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>(); 1153 IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
@@ -1307,16 +1307,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1307 // 1307 //
1308 } 1308 }
1309 1309
1310 #endregion 1310 #endregion
1311 1311
1312 private UUID GetRequestingAgentID(IClientAPI client) 1312 private UUID GetRequestingAgentID(IClientAPI client)
1313 { 1313 {
1314 UUID requestingAgentID = UUID.Zero; 1314 UUID requestingAgentID = UUID.Zero;
1315 if (client != null) 1315 if (client != null)
1316 { 1316 {
1317 requestingAgentID = client.AgentId; 1317 requestingAgentID = client.AgentId;
1318 } 1318 }
1319 return requestingAgentID; 1319 return requestingAgentID;
1320 } 1320 }
1321 } 1321 }
1322 1322
diff --git a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
index 6a82165..a1d4871 100644
--- a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
@@ -176,18 +176,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
176 176
177 byte[] StoreAccount(Dictionary<string, object> request) 177 byte[] StoreAccount(Dictionary<string, object> request)
178 { 178 {
179 //if (!request.ContainsKey("account")) 179 // No can do. No changing user accounts from remote sims
180 // return FailureResult();
181 //if (request["account"] == null)
182 // return FailureResult();
183 //if (!(request["account"] is Dictionary<string, object>))
184 // return FailureResult();
185
186 UserAccount account = new UserAccount(request);
187
188 if (m_UserAccountService.StoreUserAccount(account))
189 return SuccessResult();
190
191 return FailureResult(); 180 return FailureResult();
192 } 181 }
193 182
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
index e78429d..b19135e 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
@@ -104,6 +104,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
104 OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); 104 OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
105 if (response["Success"].AsBoolean() && response["Identities"] is OSDArray) 105 if (response["Success"].AsBoolean() && response["Identities"] is OSDArray)
106 { 106 {
107 bool md5hashFound = false;
108
107 OSDArray identities = (OSDArray)response["Identities"]; 109 OSDArray identities = (OSDArray)response["Identities"];
108 for (int i = 0; i < identities.Count; i++) 110 for (int i = 0; i < identities.Count; i++)
109 { 111 {
@@ -114,13 +116,19 @@ namespace OpenSim.Services.Connectors.SimianGrid
114 { 116 {
115 string credential = identity["Credential"].AsString(); 117 string credential = identity["Credential"].AsString();
116 118
117 if (password == credential || "$1$" + Utils.MD5String(password) == credential) 119 if (password == credential || "$1$" + Utils.MD5String(password) == credential || Utils.MD5String(password) == credential)
118 return Authorize(principalID); 120 return Authorize(principalID);
121
122 md5hashFound = true;
123 break;
119 } 124 }
120 } 125 }
121 } 126 }
122 127
123 m_log.Warn("[SIMIAN AUTH CONNECTOR]: Authentication failed for " + principalID); 128 if (md5hashFound)
129 m_log.Warn("[SIMIAN AUTH CONNECTOR]: Authentication failed for " + principalID + " using md5hash $1$" + Utils.MD5String(password));
130 else
131 m_log.Warn("[SIMIAN AUTH CONNECTOR]: Authentication failed for " + principalID + ", no md5hash identity found");
124 } 132 }
125 else 133 else
126 { 134 {
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
index 696be94..c324272 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
@@ -395,7 +395,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
395 } 395 }
396 else 396 else
397 { 397 {
398 m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve sessions for " + userID + ": " + response["Message"].AsString()); 398 m_log.Debug("[SIMIAN PRESENCE CONNECTOR]: No session returned for " + userID + ": " + response["Message"].AsString());
399 } 399 }
400 } 400 }
401 401
diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs
index 2f9b520..1527db2 100644
--- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs
+++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs
@@ -187,7 +187,7 @@ namespace OpenSim.Services.Connectors
187 return accounts; 187 return accounts;
188 } 188 }
189 189
190 public bool StoreUserAccount(UserAccount data) 190 public virtual bool StoreUserAccount(UserAccount data)
191 { 191 {
192 Dictionary<string, object> sendData = new Dictionary<string, object>(); 192 Dictionary<string, object> sendData = new Dictionary<string, object>();
193 //sendData["SCOPEID"] = scopeID.ToString(); 193 //sendData["SCOPEID"] = scopeID.ToString();
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs
index 38caf74..7b38aa6 100644
--- a/OpenSim/Services/UserAccountService/UserAccountService.cs
+++ b/OpenSim/Services/UserAccountService/UserAccountService.cs
@@ -134,6 +134,10 @@ namespace OpenSim.Services.UserAccountService
134 u.UserTitle = d.Data["UserTitle"].ToString(); 134 u.UserTitle = d.Data["UserTitle"].ToString();
135 else 135 else
136 u.UserTitle = string.Empty; 136 u.UserTitle = string.Empty;
137 if (d.Data.ContainsKey("UserLevel") && d.Data["UserLevel"] != null)
138 Int32.TryParse(d.Data["UserLevel"], out u.UserLevel);
139 if (d.Data.ContainsKey("UserFlags") && d.Data["UserFlags"] != null)
140 Int32.TryParse(d.Data["UserFlags"], out u.UserFlags);
137 141
138 if (d.Data.ContainsKey("ServiceURLs") && d.Data["ServiceURLs"] != null) 142 if (d.Data.ContainsKey("ServiceURLs") && d.Data["ServiceURLs"] != null)
139 { 143 {
@@ -218,6 +222,10 @@ namespace OpenSim.Services.UserAccountService
218 d.Data = new Dictionary<string, string>(); 222 d.Data = new Dictionary<string, string>();
219 d.Data["Email"] = data.Email; 223 d.Data["Email"] = data.Email;
220 d.Data["Created"] = data.Created.ToString(); 224 d.Data["Created"] = data.Created.ToString();
225 d.Data["UserLevel"] = data.UserLevel.ToString();
226 d.Data["UserFlags"] = data.UserFlags.ToString();
227 if (data.UserTitle != null)
228 d.Data["UserTitle"] = data.UserTitle.ToString();
221 229
222 List<string> parts = new List<string>(); 230 List<string> parts = new List<string>();
223 231