From nobody Sun Mar 12 09:04:28 2023 X-Original-To: dev-commits-src-all@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 4PZDPS74Qpz3xctq; Sun, 12 Mar 2023 09:04:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PZDPS6d7Hz4FQG; Sun, 12 Mar 2023 09:04:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678611868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S36OQdZIOkc8p+qe3RewrpBay0gp1gMgS9wNyH3N0JI=; b=SKDprF2N+onz6r01a326JL4IJBwVoWiGdHq0iUiMnO+FoKiINNWxbZ2jqiOZH1oyl7W4zw KHAPpCS42X6MXW9di9lDC7iclWiPGu7bGqO2v/kQ0BzMQgrAaXbWYGy8I2rLDxWPA7k9jI b8a0r2OzEnzAc6kAYJgVHIIK1IVHyuy/7ZU9qnyyGYaK7HzpNNCeXt1e8DpbuSumovxpzA 5DOPkH1TIQeZ64YqoPDuaMpDO3bFGSX4MHdNFPYXkmjWLn1ijpWLxF1rZ7prbA7ULNM1dX LnzleOmaXRQEhOgNLEALuVLWrZk/H8zxTUFFoJUpuQU4Cb56Vj2gHR97DOZTSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678611868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S36OQdZIOkc8p+qe3RewrpBay0gp1gMgS9wNyH3N0JI=; b=kB8Cdk+LeA/+GixITyDXBrPOHHCpKbAQfrNdEv1hY9HPlKY7Dhzp2jagnikKLEO+2b0Os0 ySGliXiAkRScSHr1CfYEQekm4vG3F8tKWWbuFcybuBwbU3XxbD8UB6a7xKp1rqNZIWYEpo r5cv64vE70rmM61ZymWsUTtj6DASqK5OZ6ZWalKOr5Q6QyLs0GUCDhiCFIO27ZMgd9/lhL K6+TIbFZU28GbpNKTd9xy3UM8IpN6JbF6Gx7ymd7i6tIDFDGob7yNtDZ8UhMC53TU7p30a +zGKpahlTZDTjnG/kqo3haOqc+SWvtssox8+k06zShawvZXwMP8gGr/G90/AMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678611868; a=rsa-sha256; cv=none; b=A/UX3VswkVUNnabfd5zd+bfn8nXkzc8p19hkNjqtNEIOFbZ1MqcC4vrgGt7Dy9nQTOKkb8 aKJGhgL+YPMhDw6twv6MCaQF69W2STCFL/2kJ7yeI3mkYkr9rInQrJmZzoBJPqbQIdNFqd puMSFjG5SbTS/0lq1RBIpMpkG1/ze7KBOMR52Fx5I1Fqf9e5EeN09tCTaS+WTJ06jMZnIY 5mOq9yMdzhOfqAFbSWzUkWcU+aIXKyi0Q1b36+61GNZ6shhPu7pO9ai434lDREHWprgvK5 i6T04AoNXNRwdeoNuwsow9uVCVaJlZRYLoP3i31NDTkuL6dj7KthdEDLG2TaPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PZDPS5hPLz15L6; Sun, 12 Mar 2023 09:04:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32C94S11099593; Sun, 12 Mar 2023 09:04:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32C94S7p099592; Sun, 12 Mar 2023 09:04:28 GMT (envelope-from git) Date: Sun, 12 Mar 2023 09:04:28 GMT Message-Id: <202303120904.32C94S7p099592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Tijl Coosemans Subject: git: baf1e9713969 - stable/13 - hostid: Generate random UUID by default List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tijl X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: baf1e9713969fccdaf7481e3568ca89b7237dafd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tijl: URL: https://cgit.FreeBSD.org/src/commit/?id=baf1e9713969fccdaf7481e3568ca89b7237dafd commit baf1e9713969fccdaf7481e3568ca89b7237dafd Author: Tijl Coosemans AuthorDate: 2023-03-09 09:02:45 +0000 Commit: Tijl Coosemans CommitDate: 2023-03-12 08:59:58 +0000 hostid: Generate random UUID by default This way MAC addresses are no longer exposed. Discussed with: bapt MFC after: 3 days (cherry picked from commit 862aab6281a5e6b5dad89761ac17ca2a0e83ab32) --- libexec/rc/rc.conf | 1 + libexec/rc/rc.d/hostid | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 6b3aacacda61..23f9406da017 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -134,6 +134,7 @@ extra_netfs_types="NO" # List of network extra filesystem types for delayed hostname="" # Set this! hostid_enable="YES" # Set host UUID. hostid_file="/etc/hostid" # File with hostuuid. +hostid_uuidgen_flags="-r" # Flags to uuidgen. nisdomainname="NO" # Set to NIS domain if using NIS (or NO). dhclient_program="/sbin/dhclient" # Path to dhcp client program. dhclient_flags="" # Extra flags to pass to dhcp client. diff --git a/libexec/rc/rc.d/hostid b/libexec/rc/rc.d/hostid index 01697a1d1e11..7368681e8a91 100755 --- a/libexec/rc/rc.d/hostid +++ b/libexec/rc/rc.d/hostid @@ -117,7 +117,7 @@ hostid_generate() warn "hostid: unable to figure out a UUID from DMI data, generating a new one" sleep 2 # If not found, fall back to software-generated UUID. - uuid=`uuidgen` + uuid=`uuidgen ${hostid_uuidgen_flags}` fi hostid_set $uuid }