Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Dec 2022 20:36:23 +0000
From:      bugzilla-noreply@freebsd.org
To:        standards@FreeBSD.org
Subject:   [Bug 268479] lib/libc/stdlib/getenv.c may have a problem with putenv()
Message-ID:  <bug-268479-99-FgvVMPaMn1@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-268479-99@https.bugs.freebsd.org/bugzilla/>
References:  <bug-268479-99@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268479

--- Comment #15 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
(In reply to Mark Millard from comment #14)

The informative part of the https://pubs.opengroup.org/onlinepubs/969991979=
9/
for the uname command reports:

QUOTE
It was suggested that this utility cannot be used portably since the format
of the symbols is implementation-defined. The POSIX.1 working group could
not achieve consensus on defining these formats in the underlying uname()
function, and there was no expectation that this volume of POSIX.1-2017
would be any more successful.
END QUOTE

The informative material for the subroutine reports:

QUOTE
The values of the structure members are not constrained to have any relation
to the version of this volume of POSIX.1-2017 implemented in the operating
system. . . .
The uname() function originated in System III, System V, and related
implementations, and it does not exist in Version 7 or 4.3 BSD. The values
it returns are set at system compile time in those historical
implementations.
END QUOTE

I find no evidence that posix requires the kind of interpretation you are
expecting. The "cannot be used portably" status, "lack of any relation"
for the values to POSIX.1-2017, and the not-set-at-compile-time
implementations that came after the initial ones would be examples that
tend to confirm that FreeBSD is not violating POSIX via FreeBSD's
behavior.

I'm afraid that you can not look to POSIX to give you the kind of guarantees
that you are looking for. It is more OS specific as to what, if any,
interface(s) provide the kind of guarantees you are looking for. (sysctl for
FreeBSD seems to cover some of it via some of its read-only content.)
It is true that some systems could choose to define uname in a way that,
for that kind of system, would have the properties.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268479-99-FgvVMPaMn1>