From 7600b0bcd0751d15c855a44cbaad6d94f745869b Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 22 Jul 2010 17:36:13 -0700 Subject: Fix EXT-8483: switch to LLMachineID::getUniqueID which should always work on windows (no dependency on Netbios). --- indra/newview/lllogininstance.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 06f490e8e3..32c358368a 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -58,6 +58,7 @@ #endif #include "llsecapi.h" #include "llstartup.h" +#include "llmachineid.h" static const char * const TOS_REPLY_PUMP = "lllogininstance_tos_callback"; static const char * const TOS_LISTENER_NAME = "lllogininstance_tos"; @@ -165,22 +166,22 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia // (re)initialize the request params with creds. LLSD request_params = user_credential->getLoginParams(); - char hashed_mac_string[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ - LLMD5 hashed_mac; - unsigned char MACAddress[MAC_ADDRESS_BYTES]; - if(LLUUID::getNodeID(MACAddress) == 0) { - llerrs << "Failed to get node id; cannot uniquely identify this machine." << llendl; + char hashed_unique_id_string[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ + LLMD5 hashed_unique_id; + unsigned char unique_id[MAC_ADDRESS_BYTES]; + if(LLMachineID::getUniqueID(unique_id, sizeof(unique_id)) == 0) { + llerrs << "Failed to get an id; cannot uniquely identify this machine." << llendl; } - hashed_mac.update( MACAddress, MAC_ADDRESS_BYTES ); - hashed_mac.finalize(); - hashed_mac.hex_digest(hashed_mac_string); + hashed_unique_id.update(unique_id, MAC_ADDRESS_BYTES); + hashed_unique_id.finalize(); + hashed_unique_id.hex_digest(hashed_unique_id_string); request_params["start"] = construct_start_string(); request_params["skipoptional"] = mSkipOptionalUpdate; request_params["agree_to_tos"] = false; // Always false here. Set true in request_params["read_critical"] = false; // handleTOSResponse request_params["last_exec_event"] = mLastExecEvent; - request_params["mac"] = hashed_mac_string; + request_params["mac"] = hashed_unique_id_string; request_params["version"] = gCurrentVersion; // Includes channel name request_params["channel"] = gSavedSettings.getString("VersionChannelName"); request_params["id0"] = mSerialNumber; -- cgit v1.2.3