[Bug 49160] Unity: SystemInfo.deviceUniqueIdentifier always the same under Wine

WineHQ Bugzilla wine-bugs at winehq.org
Wed May 27 16:24:02 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=49160

--- Comment #6 from Jamieson Christian <jamiesonc2 at gmail.com> ---
(In reply to Hans Leidekker from comment #5)
> With commit f516a23041b3871625764611321250f977fe750a we retrieve the OS
> serial number from the registry. It's the ProductId value under
> HKLM\Software\Microsoft\Windows NT\CurrentVersion.
> 
> With commit 84857d27067afaa1ae5774afe27086332263bfb5 we get the disk drive
> serial number from dbus. Note that this currently only works for drive c: in
> the default configuration.
> 
> Can you retest?

I rebuilt from latest git (wine-5.9-67-g8257fe88fb) and ran the following
tests:

#1: Fresh prefix, same physical drive as Wine. CONFIRMED the value of Unity
SystemInfo.deviceUniqueIdentifier is different from wine-5.8.

#2: Another fresh prefix, same physical drive as Wine. Observed that the value
of Unity SystemInfo.deviceUniqueIdentifier is the same as Test #1.

#3: Another fresh prefix, same physical drive as Wine. Modified
HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProductId to something other
than the placeholder value. CONFIRMED the value of Unity
SystemInfo.deviceUniqueIdentifier is different from Tests #1 and #2, as well as
different from wine-5.8.

#4: Another fresh prefix, DIFFERENT physical drive from Wine. Observed that the
value of Unity SystemInfo.deviceUniqueIdentifier is the same as Tests #1 and
#2. (Ergo, the physical device of the prefix does not influence the disk serial
number used.)

#5: Moved the Wine build to the DIFFERENT physical drive used in #4, ran it
with another fresh prefix on that same drive. Observed that the value of Unity
SystemInfo.deviceUniqueIdentifier is the same as Tests #1 and #2. (Ergo, the
physical device that Wine runs from does not influence the disk serial number
used.)

CONCLUSIONS:

The use of the disk drive serial # causes Unity
SystemInfo.deviceUniqueIdentifier to vary, presumably to a sufficient degree to
reasonably ensure different values between users. The device from which the
serial # is drawn is independent of where Wine, or the prefix, are located
(e.g. always /dev/sda or something). This is, I presume, what you meant by
"always drive c: in the default configuration".

The use of HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProductId does not
cause Unity SystemInfo.deviceUniqueIdentifier to vary (insofar as the value is
still the same for every new prefix), but does give users a viable workaround
if needed. A more random generation of HKLM\Software\Microsoft\Windows
NT\CurrentVersion\ProductId may be considered a "nice-to-have" feature and not
required, given the diversity introduced by the disk drive serial #.

I believe the changes adequately satisfy the requirements. Thank you!

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list