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

WineHQ Bugzilla wine-bugs at winehq.org
Fri May 15 11:46:31 CDT 2020


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

--- Comment #3 from Hans Leidekker <hans at meelstraat.net> ---
(In reply to Jamieson Christian from comment #2)
> Under dbus, there's /var/lib/dbus/machine-id, which on some distros is
> simply a symlink to /etc/machine-id. Neither requires root access. On Ubuntu
> 20.04, /var/lib/dbus/machine-id is a symlink, and /etc/machine-id remains
> consistent between boots. (On a permanent OS install; stateless boot is a
> different matter.)

Right, we already use this ID for Win32_ComputerSystemProduct.UUID.

> > > Line 2117: DiskDrive serial number = L"WINEHDISK"
> > 
> > Looks like we can do better here. It should be possible to retrieve the disk
> > serial number through dbus, or we could perhaps substitute the volume serial
> > number.
> 
> This CLI technique hints at a possible approach:
> 
> udevadm info --query=all --name=sda | grep SERIAL=
> 
> The above seems to produce a distillation of /sys/block/sda/device/wwid

I was thinking of querying UDisks2.Drive.Id through dbus, which should return
the same thing.

> > > Line 3417: OS serial number = L"12345-OEM-1234567-12345"
> > 
> > We should read this from HKLM\Software\Microsoft\Windows
> > NT\CurrentVersion\ProductId. While this is currently also set to a fixed
> > value it would at least give users the opportunity to change the value. I
> > guess we could improve on this by generating a unique value on prefix
> > creation.
> 
> This sounds like a good approach. Generating a unique value is ideal.

Some googling leads me to believe that this isn't really a unique ID. It's
still a good idea to retrieve this from the registry.

-- 
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