[Bug 268479] lib/libc/stdlib/getenv.c may have a problem with putenv()

[email protected]
Newsgroups gmane.os.freebsd.devel.standards
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268479

--- Comment #3 from Dennis Clarke <[email protected]> ---
(In reply to Mark Millard from comment #2)

I must agree fully. There does not seem to be a reason to disallow
a name=value pair to exist where the value is nothing at all. I see
the words "the value shall be composed of characters from the portable
character set" but no where does the POSIX spec claim that we *must*
have some characters after the equal '=' to form a "value". So I guess
putenv() and friends are doing what they claim to do. Correctly.

That leads to the other problem wherein env var names such as UNAME_s
can override the uname(3) struct members within FreeBSD. If we have an
env var name=value such as "UNAME_r=" then how shall a process ever
determine the uname(3) release data? It seems that I need to write my
own hackary to walk through extern char **environ and mangle it myself?

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.