diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2015-10-09 20:56:43 +0200 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2015-10-13 15:39:38 +0200 |
commit | dbd046be21faab7346db55f3dd638162a20f3941 (patch) | |
tree | 656033472290e8f0eaebeb3dc16148235859d8ea /src/palrt | |
parent | 2e70585b98e6371aae2d00f3fcf537de0a3cfdab (diff) | |
download | coreclr-dbd046be21faab7346db55f3dd638162a20f3941.tar.gz coreclr-dbd046be21faab7346db55f3dd638162a20f3941.tar.bz2 coreclr-dbd046be21faab7346db55f3dd638162a20f3941.zip |
Implement CoCreateGuid using uuid_generate on Unix
We were generating GUIDs on Unix as random numbers. But that is not
correct since GUIDs have defined structure with bits having specific
meanings. For example, there are four bits that represent the type of
the GUID, which means whether the guid is randomly generated,
name based on SHA1, time based etc.
This change changes the CoCreateGuid to use the uuid_generate function
from the uuid library that should generate well-formed GUIDs on
Linux and OSX and the uuid_create on FreeBSD.
Diffstat (limited to 'src/palrt')
-rw-r--r-- | src/palrt/coguid.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/palrt/coguid.cpp b/src/palrt/coguid.cpp index 69398fb427..c78229a15d 100644 --- a/src/palrt/coguid.cpp +++ b/src/palrt/coguid.cpp @@ -13,17 +13,6 @@ #include "common.h" -STDAPI CoCreateGuid(OUT GUID * pguid) -{ - if (!PAL_Random(FALSE, pguid, sizeof(GUID))) - { - DWORD dwError = GetLastError(); - return HRESULT_FROM_WIN32(dwError); - } - - return S_OK; -} - STDAPI_(int) StringFromGUID2(REFGUID rguid, LPOLESTR lptsz, int cchMax) { if (cchMax < 39) |