diff options
Diffstat (limited to 'OpenSim/Services/LLLoginService/LLLoginService.cs')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index d67bc4d..ba69e95 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -151,7 +151,8 @@ namespace OpenSim.Services.LLLoginService | |||
151 | Object[] args = new Object[] { config }; | 151 | Object[] args = new Object[] { config }; |
152 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); | 152 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); |
153 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); | 153 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); |
154 | m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, args); | 154 | Object[] authArgs = new Object[] { config, m_UserAccountService }; |
155 | m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, authArgs); | ||
155 | m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args); | 156 | m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args); |
156 | 157 | ||
157 | if (gridService != string.Empty) | 158 | if (gridService != string.Empty) |
@@ -257,14 +258,20 @@ namespace OpenSim.Services.LLLoginService | |||
257 | } | 258 | } |
258 | 259 | ||
259 | public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, | 260 | public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, |
260 | string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP) | 261 | string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP, bool LibOMVclient) |
261 | { | 262 | { |
262 | bool success = false; | 263 | bool success = false; |
263 | UUID session = UUID.Random(); | 264 | UUID session = UUID.Random(); |
265 | <<<<<<< HEAD | ||
264 | string processedMessage; | 266 | string processedMessage; |
267 | ======= | ||
268 | if (clientVersion.Contains("Radegast")) | ||
269 | LibOMVclient = false; | ||
270 | >>>>>>> avn/ubitvar | ||
265 | 271 | ||
266 | m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}", | 272 | |
267 | firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0); | 273 | m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}, Possible LibOMVGridProxy: {8} ", |
274 | firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0, LibOMVclient.ToString()); | ||
268 | 275 | ||
269 | try | 276 | try |
270 | { | 277 | { |
@@ -310,6 +317,12 @@ namespace OpenSim.Services.LLLoginService | |||
310 | return LLFailedLoginResponse.UserProblem; | 317 | return LLFailedLoginResponse.UserProblem; |
311 | } | 318 | } |
312 | 319 | ||
320 | if (account.UserLevel < 0) | ||
321 | { | ||
322 | m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: Unverified account"); | ||
323 | return LLFailedLoginResponse.UnverifiedAccountProblem; | ||
324 | } | ||
325 | |||
313 | if (account.UserLevel < m_MinLoginLevel) | 326 | if (account.UserLevel < m_MinLoginLevel) |
314 | { | 327 | { |
315 | m_log.InfoFormat( | 328 | m_log.InfoFormat( |
@@ -341,7 +354,8 @@ namespace OpenSim.Services.LLLoginService | |||
341 | if (!passwd.StartsWith("$1$")) | 354 | if (!passwd.StartsWith("$1$")) |
342 | passwd = "$1$" + Util.Md5Hash(passwd); | 355 | passwd = "$1$" + Util.Md5Hash(passwd); |
343 | passwd = passwd.Remove(0, 3); //remove $1$ | 356 | passwd = passwd.Remove(0, 3); //remove $1$ |
344 | string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30); | 357 | UUID realID; |
358 | string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30, out realID); | ||
345 | UUID secureSession = UUID.Zero; | 359 | UUID secureSession = UUID.Zero; |
346 | if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) | 360 | if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) |
347 | { | 361 | { |
@@ -508,11 +522,19 @@ namespace OpenSim.Services.LLLoginService | |||
508 | processedMessage = processedMessage.Replace("\\n", "\n").Replace("<USERNAME>", firstName + " " + lastName); | 522 | processedMessage = processedMessage.Replace("\\n", "\n").Replace("<USERNAME>", firstName + " " + lastName); |
509 | 523 | ||
510 | LLLoginResponse response | 524 | LLLoginResponse response |
525 | <<<<<<< HEAD | ||
511 | = new LLLoginResponse( | 526 | = new LLLoginResponse( |
512 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, | 527 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, |
513 | where, startLocation, position, lookAt, gestures, processedMessage, home, clientIP, | 528 | where, startLocation, position, lookAt, gestures, processedMessage, home, clientIP, |
514 | m_MapTileURL, m_SearchURL, m_Currency, m_DSTZone, | 529 | m_MapTileURL, m_SearchURL, m_Currency, m_DSTZone, |
515 | m_DestinationGuide, m_AvatarPicker, m_ClassifiedFee, m_MaxAgentGroups); | 530 | m_DestinationGuide, m_AvatarPicker, m_ClassifiedFee, m_MaxAgentGroups); |
531 | ======= | ||
532 | = new LLLoginResponse( | ||
533 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, | ||
534 | where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, | ||
535 | m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone, | ||
536 | m_DestinationGuide, m_AvatarPicker, realID, m_ClassifiedFee); | ||
537 | >>>>>>> avn/ubitvar | ||
516 | 538 | ||
517 | m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); | 539 | m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); |
518 | 540 | ||