From nobody Sun Dec 25 08:46:37 2022 X-Original-To: standards@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 4NfvfQ0YVhz1HHY4 for ; Sun, 25 Dec 2022 08:46:38 +0000 (UTC) (envelope-from bugzilla-noreply@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 4NfvfP5FJGz3M5Q for ; Sun, 25 Dec 2022 08:46:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671957997; 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: in-reply-to:in-reply-to:references:references; bh=eobx/jxqlbJpY0fpUqVtaZKqLYFtPGhei8+WzuC+S5U=; b=JdzUqNV6or/qBzqCNsRgOG+BhpvAnAGocZnlif/vyDf5Qkqrwa0LqwKFet6ZHwOKcm7B5O l7jNagJ4n9AWQ2fOro3s/5J+CMszZh0tektKcgcN0eLllBQUS18NW6YOdjlQ1EbngolY+t VswnrOZdAwteKY/Zrm2TAMfA4fSYEt4SHVdT6c1ysqTvtARee7K9sjzv/owSWp/Qsx5T1a v85gchGgn0oI5Dhk/2y+HyFEFqeogEzY/s5EHCUZHqkFex9OiDl2TwW+pipkaliV4bOiTh CjGLUXXHpfRmK0nw4xltJGkk0mDnr6wVMpmU9zoh1JzAI056Ayp5/inHCM3a/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671957997; a=rsa-sha256; cv=none; b=ltd7mIxbZFxoWBQ8lmCfL0U7m+wk1yGOingvXDE01ltpHzh9QltwKxotDclMfXapNJLmar cIqGmcrlfEXlWa2a4PW2YSnl0HcTrN/GdWd2J4GGPYzfFuwOYzlzKz2olXRCeMKsi6KjSs aOYOENluxqwd/rQfI5iMPqq1T4fSX916ySbc9a2x84qsgvzHza1KIkBtcK0qPgwndCpNAy YwTxI7rFNVlIEatoBmVPxRxjnxmRAiBbidnH3TiIpm94QcUa3qb4kWyVwxnflNIv1dCSFo Wil7LK8k7ASz8ZUNz7a+tDy4+ISfrA7zNvQQDKOIxpV07n7saJJLUHd3MsuokQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4NfvfP4C1Lzm22 for ; Sun, 25 Dec 2022 08:46:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 2BP8kbkW050197 for ; Sun, 25 Dec 2022 08:46:37 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2BP8kbLe050196 for standards@FreeBSD.org; Sun, 25 Dec 2022 08:46:37 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: standards@FreeBSD.org Subject: [Bug 268479] lib/libc/stdlib/getenv.c may have a problem with putenv() Date: Sun, 25 Dec 2022 08:46:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: marklmi26-fbsd@yahoo.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: standards@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Standards compliance List-Archive: https://lists.freebsd.org/archives/freebsd-standards List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268479 --- Comment #10 from Mark Millard --- (In reply to Tatsuki Makino from comment #9) I'm confused about your point. uname(1) and uname(3) are not the same as the sysctl but can use the sysctl, absent an overriding UNAME_* . Various usages of uname(1) and uname(3) do not want the value that sysctl provides: some deliberately different UNAME_* assignments are used at times. sysctl values are provide defaults. lib/libc/gen/getosreldate.c's getosreldate() checks for OSVERSION in the environment and only uses the sysctl when OSVERSION is not found. (Analogous to UNAME_* usage.) Also, uname -U is not ever via a sysctl: the default is from the world (not kernel) __FreeBSD_version macro value for uname's compilation context. kern.build_id, kern.ident, kern.osreldate, kern.osrelease, and kern.version reflect the actual kernel running, not the one being simulated in, say, a chroot into an older version of world. Various things instead need identify the simulated kernel version being targeted instead. Mostly this involves providing alternate definitions to kern.osreldate and kern.osrelease . Similarly, there are contexts in which the hw.machine and hw.machine_arch from the booted kernel are inappropriate to identifying a simulated/emulated environment. --=20 You are receiving this mail because: You are the assignee for the bug.=