From nobody Mon Dec 26 08:16:47 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 4NgVxX0Qlgz20chB for ; Mon, 26 Dec 2022 08:16:48 +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 4NgVxW6Sz8z4PTk for ; Mon, 26 Dec 2022 08:16:47 +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=1672042607; 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=NioNLI5elThvG8YbL21ARoYrmrAZzWOU3xx0L8T/ErY=; b=yTeTCPNX19mFrQR/7krMFOqjt8bH/Kg5ayOUgLFgKS03Ha9lqs7mKfnyy/nns85nqBsCtP djZu358462XCM4Y5cHgtwtwnpO2WI6GEdnSj+kkn1Qyc23adj+yukRqZyk8WtnyxkzBllj 20mKxiHmJU18ELJYe1XSRz8NlvMTgOKXkwYVGIhZLyGLomWJaTVxA7pTftWvHavnfqvOfB r3ZS5+oc9Pm531zc0AvjT+Bexa1udHE1RO3ksEBAY543xw0m61y8zhpRn4jPTmLm+MPsRS zhEezOHfFMW+tWlXrMHlweobGwrAFxkmDZIYPPG98S87P3iRHk1MeRLhlrq5Iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672042607; a=rsa-sha256; cv=none; b=y3strwPshKn0IAfnaczVEIJYrLKG/Od8T+lBzdjsLIaFDQZ2tCXulqOt6AnnIx0vu2U9x+ v0O96ejLuHXpc0g/uY5kIt+LrQTiZ6lmszi0ZTTmJntZnI51NPbHyFVnrHrNGtB5uhKn6Q Lb/cSH/2qiP0pwgHpVONoOmR3cGUMrF6tmY4GQA7Ie/AzqR3OAZFdufeYEw1T8jpZCRUzN zbhqIDSUTSR87PuN79RyrkLdeyXKWSOkZZZN3s5WFRLX1dp8mwLEkSvzYw5Se0d48HHEdK TPQOAWyXSHF9PX93X1+mnYFrvy2/2OyTkcA9NXOXeT9An39pAT/6NNJWXJ+Yzg== 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 4NgVxW5QklzPdc for ; Mon, 26 Dec 2022 08:16:47 +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 2BQ8Glpr084299 for ; Mon, 26 Dec 2022 08:16:47 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2BQ8GlxN084298 for standards@FreeBSD.org; Mon, 26 Dec 2022 08:16:47 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: Mon, 26 Dec 2022 08:16:47 +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 #14 from Mark Millard --- (In reply to Dennis Clarke from comment #12) To know the the boot FreeBSD kernel information (for the active architecture when more than one is possible) in a context known to be FreeBSD, use: sysctl(8) - get or set kernel state or: sysctl, sysctlbyname, sysctlnametomib(3) - get or set system information I'm unsure why other programming interfaces should be a strictly redundant presentation of the same information as the subset of sysctl information that provides defaults for the interface(s) you are trying to use for some reason. In other words, if you use the right interface, you can "can actually know the system we are running on". Why do you insist on using the interface that you are trying to use for this? FreeBSD would be broken in various respects if its standard operating procedures in various places suddenly stopped working in order to not return different uname(1) and uname(3) results than sysctl (and its variants) would return. FYI: FreeBSD 4.8 looks to be the first release that uname(1) documents with: ENVIRONMENT An environment variable composed of the string UNAME_ followed by any flag to the uname utility (except for -a) will allow the corresponding data to be set to the contents of the environment variable. But, interestingly, 6.3 looks to be the first that uname(3) documents with: ENVIRONMENT UNAME_s If the environment variable UNAME_s is set, it will override = the sysname member. UNAME_r If the environment variable UNAME_r is set, it will override = the release member. UNAME_v If the environment variable UNAME_v is set, it will override = the version member. UNAME_m If the environment variable UNAME_m is set, it will override = the machine member. In other words: these were added later than uname(1) and uname(3) were originally added. But they have been around for a while. --=20 You are receiving this mail because: You are the assignee for the bug.=