From nobody Fri Mar 3 18:36:20 2023 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PSxWq23Rbz3wCY7 for ; Fri, 3 Mar 2023 18:36:39 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic308-55.consmr.mail.gq1.yahoo.com (sonic308-55.consmr.mail.gq1.yahoo.com [98.137.68.31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PSxWp0H3Yz3vyL for ; Fri, 3 Mar 2023 18:36:37 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=SQZ4lUs+; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.68.31 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1677868596; bh=RRp8oRnZZsfaWG956RKYw4KQwwr3QB+bM1qv9R7Q2KA=; h=From:Subject:Date:Cc:To:References:From:Subject:Reply-To; b=SQZ4lUs+lqY1fNyMUigZNKOxd+WX4ZLycsR787Y7VC4eSEn4TfCBBeA+n/l1qZGNI51P1zMC+v/iNncBW+emuJLHl081ssk8DSciwZTSNXWlnOs9SyF1japvvKRGWyckxwxx2PiauakmqzXKxdxGlyB9QpWuEWVOlkz5G0782bLkZN8gCXRsdfM0y9sO4OWFJaDkuhBNkiJwx2Y7g8RVQq1EJQeuRjqZpbvBO/B8pgOwm/eyEbiI62qnczGTh/LGicM0/ebUli+jTbdDUYjytxpDW/CdJC8sV/Ky2XzJiPFJaPySN6UYW16I2WG9/EB5KnuexW+e/5TVbwcGtJ19Lg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1677868596; bh=orqTuA6/oWDEw4fPYunX9QI9MGhnRNj/YNv1mXs8oN/=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=DDfnew4oN20tF+vBIwjtkLuDoGVAr+B0WmpaO3NlIRtStxM3Tmu040oOE4Z9FvW2zkP2hUSagsWStMD2aFCu0RmDNBX/bj2JiclT/QA+x7jy6TtlHBcejFg+tV2nlhEPpibQRXtNc5JlOxdNhv9c5T+ubIMcXQRbu/lbr0EnNRQehx1dVEx8FVj6IlU1zJia8SBlXoDjRzcRfEf312oGGSqq9n0A/Qm22RGZErXtvZImb3fGVyn0tmMfseywel6XL/aYc7gscHaU56f/MlAuNGOzVgIEHEzHYWcosrlGYEOjqsf2O1W7GMh4+pBl1cXaxwr01gXB+/ueK8pdmOK7DQ== X-YMail-OSG: VT0EyoAVM1nS0aL_q22ORxfuq2__kl2VhydoynReI8jI5f0IAz1_qemvJufiKtD TjVcX6OVNkFAnaJPpBJqBREJ.DQujTxQqhh.5cw86WqY0b3fHpbK2WJX6D0rruuRq78Y8r5trmyC S9C6Ek6aPOq75bJ1qvqGccMFT7_IW7xFySEex1iLVesbvDE8tUIb97hrEMJZ_FHVmbYjexlz94tt qzGwxUnAHJ6VpLzreXd0cEE5HDwpcjePNH9Tm7Lsn7ZYiyL8MbC5Rny9D6W6pyn3HFFtHUkf0.a5 MEoC.fi1CN2PQRzeNXb1CUQ8Qy1D7JNSpXof5j580Mmm0ExMeq6KnFSGmzJ9US7.kFfDofm_8iPZ mMGzqm0ysF48axSx3uORqUGPGwapQfjXc0Ameq0POMl0LgOrmnjKXz4yP2UKCPJonR79QYUveIO6 7vu.3zGogo9mj.sbp7aXXqef4yaAZhbsw71nOmGmXRXdI_CE2Sfr21R_tAmahoVWEuc7nXcAS4hQ 4ET6nwX046EB0w9.n8Z77xRg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Ra_NsGPDDgTtXbPHQKKbj5EtUtMQzfpdMMr1sSSXTfm 6cAKZwbqr1shtMKTz5wXZ_6rpjWyxJMiO8DCLM8dwJSdQou5GA1MBj0QewFNNsKG2lEMPGsmJash oT1UPPUtO3eqRNow3WCrXW64BmcXTDKBsB0XD7sShq25hi2cGJfdxz9Rlusnl_0o_M8a_Hfdn2Aa UWALFUNyHk6hinCqqCWl5CpnCr1Mrcj0ORJPrERoVwiKyZ4l3qn7KB4VW5I9kXSI.yGkRktJ5h7y PcTE4MaSmMunOQXe5DUbZeNTJvCC3Z2.NDer7fpiqyOvz4vZetVxpQEzthqDzXZ_FSYbUhJvrpbN Ps.64zlIaYBmsvFCP_r2f70gqFndmyJAW3OxyeGpV0SbaiEL2mWP13aDp67forlJOKSWgTlKD96y OgHFikBfhokKjcU56dB9rFIQWU5VkXnJitcCAxTuO2DTDfgVNUIegQb9x.uloyu4K6tW5t9sdg28 Xi090LHVVYR3JQavTRi6LiPFyajcFbW_hwaqa3WbuVlO5rPDglK5tyN58tifgqdAexDbDo7CqXBD fr0ihsCgDJG84oiY2kwQp3emWVVDdaC4T1UGeZY2iIm80I_Di1iXgigxNZsXUMsHS3vL7ulbTe4Z x6DXHkGltT8m8YrjkeKx8ABcQbWcB.rUlMUM24QevYsgB9KVCIOvzaA7Vn7HgPQZpRpOSSoQ4Kmz hORkEg6jEFA-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.gq1.yahoo.com with HTTP; Fri, 3 Mar 2023 18:36:36 +0000 Received: by hermes--production-gq1-6cf7749bc8-g5z7v (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID f101f13d945b52ccdfa12d3640067696; Fri, 03 Mar 2023 18:36:31 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: git: a28ccb32bf56 - main - machine-id: generate a compact version of the uuid Message-Id: <6227093D-3D45-4300-97B9-2F2D76C083BE@yahoo.com> Date: Fri, 3 Mar 2023 10:36:20 -0800 Cc: "bapt@freebsd.org" , =?utf-8?Q?T=C4=B3l_Coosemans?= , FreeBSD-STABLE Mailing List , Current FreeBSD To: Mike Karels , dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3731.400.51.1.1) References: <6227093D-3D45-4300-97B9-2F2D76C083BE.ref@yahoo.com> X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.50)[-0.496]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; TO_DN_EQ_ADDR_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.31:from]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCPT_COUNT_FIVE(0.00)[6]; DKIM_TRACE(0.00)[yahoo.com:+]; RCVD_COUNT_THREE(0.00)[3]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-stable@freebsd.org] X-Rspamd-Queue-Id: 4PSxWp0H3Yz3vyL X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N Mike Karels wrote on Date: Fri, 03 Mar 2023 16:12:50 UTC : > On 3 Mar 2023, at 9:40, T=C4=B3l Coosemans wrote: >=20 > > On Wed, 1 Mar 2023 18:18:33 GMT Baptiste Daroussin = wrote: > >> The branch main has been updated by bapt: > >> > >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Da28ccb32bf5678fc401f1602865ee9b3= 7ca4c990 > >> > >> commit a28ccb32bf5678fc401f1602865ee9b37ca4c990 > >> Author: Baptiste Daroussin > >> AuthorDate: 2023-02-28 10:31:06 +0000 > >> Commit: Baptiste Daroussin > >> CommitDate: 2023-03-01 18:16:25 +0000 > >> > >> machine-id: generate a compact version of the uuid > >> > >> dbus and other actually expect an uuid without hyphens > >> > >> Reported by: tijl > >> MFC After: 3 days > >> --- > >> libexec/rc/rc.d/machine_id | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/libexec/rc/rc.d/machine_id = b/libexec/rc/rc.d/machine_id > >> index 7cfd7b2d92f8..8bf3e41d0603 100644 > >> --- a/libexec/rc/rc.d/machine_id > >> +++ b/libexec/rc/rc.d/machine_id > >> @@ -23,7 +23,7 @@ machine_id_start() > >> if [ ! -f ${machine_id_file} ] ; then > >> startmsg -n "Creating ${machine_id_file} " > >> t=3D$(mktemp -t machine-id) > >> - /bin/uuidgen -r -o $t > >> + /bin/uuidgen -r -c -o $t > >> install -C -o root -g wheel -m ${machine_id_perms} "$t" = "${machine_id_file}" > >> rm -f "$t" > >> startmsg 'done.' > > > > I really think this file should be defined to contain the same UUID = as > > /etc/hostid such that there's one and only one UUID per machine. = Having > > two different IDs needlessly complicates things if they end up in = logs > > etc. > > > > It also looks like on Linux virtual machines this file contains the > > SMBIOS UUID just like our /etc/hostid. If /etc/machine-id is = supposed > > to be a portable way to obtain that UUID it should be the same as > > /etc/hostid. >=20 > I agree. I had the same reaction when the machine-id was added, but > thought the requirements were different (in particular, the UUID = version). > If at all possible, the two should be the same except for hyphens. >=20 > > Please have another look at https://reviews.freebsd.org/D38811. This > > file is supposed to remain constant across updates. If we get this > > wrong in 13.2, applications may have to deal with the complications = for > > a very long time. >=20 > This should be resolved for 13.2 if at all possible. What are the properties for the content of /etc/hostid in FreeBSD? Where are they documented? /etc/machine-id has strong property guarnatee requirements in linux and dbus (which linux indicates it has adopted requirements from): https://man7.org/linux/man-pages/man5/machine-id.5.html reports: QUOTE The machine ID does not change based on local or network configuration or when hardware is replaced. Due to this and its greater length, it is a more useful replacement for the gethostid(3) call that POSIX specifies. This machine ID adheres to the same format and logic as the D-Bus machine ID. END QUOTE https://dbus.freedesktop.org/doc/dbus-uuidgen.1.html reports: ( used via dbus-uuidgen --ensure=3D/etc/machine-id as one way to get a linux-comaptibile /etc/machine-id for at least some types of contexts ) QUOTE The important properties of the machine UUID are that 1) it remains unchanged until the next reboot and 2) it is different for any two running instances of the OS kernel. That is, if two processes see the same UUID, they should also see the same shared memory, UNIX domain sockets, local X displays, localhost.localdomain resolution, process IDs, and so forth END QUOTE Does /etc/hostid generated the normal way in FreeBSD have such properties? (How do I look that up?) Returning to: https://man7.org/linux/man-pages/man5/machine-id.5.html QUOTE This ID uniquely identifies the host. It should be considered "confidential", and must not be exposed in untrusted environments, in particular on the network. If a stable unique identifier that is tied to the machine is needed for some application, the machine ID or any part of it must not be used directly. Instead the machine ID should be hashed with a cryptographic, keyed hash function, using a fixed, application-specific key. That way the ID will be properly unique, and derived in a constant way from the machine ID but there will be no way to retrieve the original machine ID from the application-specific one. END QUOTE Is that at least recommended for handling FreeBSD's /etc/hostid content? Is FreeBSD going to document /etc/machine-id content properties in a similar manor? If FreeBSD ends up with a /etc/machine-id that does not have the properties and recommended principles of use, it would appear that the /etc/machine-id path would be highly misleading and, so, inappropriate. =3D=3D=3D Mark Millard marklmi at yahoo.com