On Tue Sep 10 23:16:34 2024 +0000, Grigory Vasilyev wrote:
@Alcaro I would suggest a not so healthy idea, use a server and make a `get_prefix_id` request, randomly generate a guid and store it in a file in `system32/wineguid.dll`, the format is 16 bytes guid and 4 bytes Jenkins hash for guid. The server will read the file on startup, cache the contents and return the value. If the file does not exist, then generate a new file and guid. Ideally, we can use TPM 2.0 for this purpose.
Registry or file both sound good to me. Small binary pieces usually go in registry, but I have no strong preference. The registry is just a file, anyways.
I do, however, question why you're proposing (1) appending a hash (I can't see what that would accomplish) (2) storing something other than a DLL in a file named .dll (I'd use something generic, like .bin or .dat) (3) using a TPM (unlike some win32 implementations, Wine doesn't require TPM - and there's no public key cryptography or boot measurement involved here, so TPM accomplishes nothing even if available) (4) going via wineserver (I can't see what that would accomplish either, files and registry are available to everyone).
If you want to prevent users from resetting or customizing the boot ID, you're gonna have a bad time. Wine is open source, a dedicated user could simply modify ntdll. You cannot prevent that.