linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] putenv.3: originated in SysVr2; in 4.3BSD-Reno; fixed on modern systems
@ 2023-05-23 20:17 наб
  2023-05-23 20:20 ` Alejandro Colomar
  0 siblings, 1 reply; 4+ messages in thread
From: наб @ 2023-05-23 20:17 UTC (permalink / raw)
  To: Alejandro Colomar (man-pages); +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]

Fixed in:
  NetBSD 6     src lib/libc/stdlib/putenv.c 1.13
  FreeBSD 7    putenv(3) says so
  OpenBSD 4.6  src lib/libc/stdlib/setenv.c 1.10
and is correct under current(?) MacOS as well

The current wording implies that all of 4.4BSD's descenants also carry
this bug (at least it did to me): they did until like 2009 but they're
fine now
---
 man3/putenv.3 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/man3/putenv.3 b/man3/putenv.3
index 59c2ff1..cb80b29 100644
--- a/man3/putenv.3
+++ b/man3/putenv.3
@@ -83,7 +83,7 @@ .SH ATTRIBUTES
 .SH STANDARDS
 POSIX.1-2008.
 .SH HISTORY
-POSIX.1-2001, SVr4, 4.3BSD.
+POSIX.1-2001, SVr2, 4.3BSD-Reno.
 .PP
 The
 .BR putenv ()
@@ -119,7 +119,8 @@ .SH HISTORY
 On the one hand this causes a memory leak, and on the other hand
 it violates SUSv2.
 .PP
-The 4.4BSD version, like glibc 2.0, uses a copy.
+The 4.3BSD-Reno version, like glibc 2.0, uses a copy;
+this is fixed in all modern BSDs.
 .PP
 SUSv2 removes the \fIconst\fP from the prototype, and so does glibc 2.1.3.
 .PP
-- 
2.30.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] putenv.3: originated in SysVr2; in 4.3BSD-Reno; fixed on modern systems
  2023-05-23 20:17 [PATCH] putenv.3: originated in SysVr2; in 4.3BSD-Reno; fixed on modern systems наб
@ 2023-05-23 20:20 ` Alejandro Colomar
  2023-05-23 20:58   ` наб
  0 siblings, 1 reply; 4+ messages in thread
From: Alejandro Colomar @ 2023-05-23 20:20 UTC (permalink / raw)
  To: наб; +Cc: linux-man


[-- Attachment #1.1: Type: text/plain, Size: 1356 bytes --]


Hi!

On 5/23/23 22:17, наб wrote:
> Fixed in:
>   NetBSD 6     src lib/libc/stdlib/putenv.c 1.13
>   FreeBSD 7    putenv(3) says so
>   OpenBSD 4.6  src lib/libc/stdlib/setenv.c 1.10
> and is correct under current(?) MacOS as well
> 
> The current wording implies that all of 4.4BSD's descenants also carry
> this bug (at least it did to me): they did until like 2009 but they're
> fine now
> ---
>  man3/putenv.3 | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/man3/putenv.3 b/man3/putenv.3
> index 59c2ff1..cb80b29 100644
> --- a/man3/putenv.3
> +++ b/man3/putenv.3
> @@ -83,7 +83,7 @@ .SH ATTRIBUTES
>  .SH STANDARDS
>  POSIX.1-2008.
>  .SH HISTORY
> -POSIX.1-2001, SVr4, 4.3BSD.
> +POSIX.1-2001, SVr2, 4.3BSD-Reno.
>  .PP
>  The
>  .BR putenv ()
> @@ -119,7 +119,8 @@ .SH HISTORY
>  On the one hand this causes a memory leak, and on the other hand
>  it violates SUSv2.
>  .PP
> -The 4.4BSD version, like glibc 2.0, uses a copy.
> +The 4.3BSD-Reno version, like glibc 2.0, uses a copy;

Maybe we should say s/uses/used/?

Cheers,
Alex

> +this is fixed in all modern BSDs.
>  .PP
>  SUSv2 removes the \fIconst\fP from the prototype, and so does glibc 2.1.3.
>  .PP

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] putenv.3: originated in SysVr2; in 4.3BSD-Reno; fixed on modern systems
  2023-05-23 20:20 ` Alejandro Colomar
@ 2023-05-23 20:58   ` наб
  2023-05-23 23:20     ` Alejandro Colomar
  0 siblings, 1 reply; 4+ messages in thread
From: наб @ 2023-05-23 20:58 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]

On Tue, May 23, 2023 at 10:20:07PM +0200, Alejandro Colomar wrote:
> On 5/23/23 22:17, наб wrote:
> > @@ -119,7 +119,8 @@ .SH HISTORY
> >  On the one hand this causes a memory leak, and on the other hand
> >  it violates SUSv2.
> >  .PP
> > -The 4.4BSD version, like glibc 2.0, uses a copy.
> > +The 4.3BSD-Reno version, like glibc 2.0, uses a copy;
> Maybe we should say s/uses/used/?
4.3BSD-Reno is a single release and hence a single version,
and nothing's changed about it, so it still "is".

We could say "The BSD used" but we have hard versions, so.

The same holds for the first long line in HISTORY:
  The putenv() function is not required to be reentrant, and the one in
  glibc 2.0 is not, but the glibc 2.1 version is.
the singular version which was part of the glibc 2.0 release(s) hasn't
changed in glibc 2.0, and glibc 2.0 "is" (but yeah, glibc "was").

Present tense also appears to be a prevalent style globally:
  setuid(2) says "Not quite compatible with the 4.4BSD call, which sets
                  all of the real, saved, and effective user IDs."
  setjmp(3) says "In 4.3BSD it will, and there is a function _setjmp()
                  that will not."

Best,

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] putenv.3: originated in SysVr2; in 4.3BSD-Reno; fixed on modern systems
  2023-05-23 20:58   ` наб
@ 2023-05-23 23:20     ` Alejandro Colomar
  0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Colomar @ 2023-05-23 23:20 UTC (permalink / raw)
  To: наб; +Cc: linux-man


[-- Attachment #1.1: Type: text/plain, Size: 2113 bytes --]

Hi!

On 5/23/23 22:58, наб wrote:
> On Tue, May 23, 2023 at 10:20:07PM +0200, Alejandro Colomar wrote:
>> On 5/23/23 22:17, наб wrote:
>>> @@ -119,7 +119,8 @@ .SH HISTORY
>>>  On the one hand this causes a memory leak, and on the other hand
>>>  it violates SUSv2.
>>>  .PP
>>> -The 4.4BSD version, like glibc 2.0, uses a copy.
>>> +The 4.3BSD-Reno version, like glibc 2.0, uses a copy;
>> Maybe we should say s/uses/used/?
> 4.3BSD-Reno is a single release and hence a single version,
> and nothing's changed about it, so it still "is".
> 
> We could say "The BSD used" but we have hard versions, so.
> 
> The same holds for the first long line in HISTORY:
>   The putenv() function is not required to be reentrant, and the one in
>   glibc 2.0 is not, but the glibc 2.1 version is.
> the singular version which was part of the glibc 2.0 release(s) hasn't
> changed in glibc 2.0, and glibc 2.0 "is" (but yeah, glibc "was").
> 
> Present tense also appears to be a prevalent style globally:
>   setuid(2) says "Not quite compatible with the 4.4BSD call, which sets
>                   all of the real, saved, and effective user IDs."
>   setjmp(3) says "In 4.3BSD it will, and there is a function _setjmp()
>                   that will not."

Makes sense.  I applied both patches.  And put your signature in
this one.

BTW:

$ git log | grep nabijacz | sort | uniq
    Cc: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
    Cc: наб <nabijaczleweli@nabijaczleweli.xyz>
    Reported-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
    Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz>
    Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Author: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Author: наб <nabijaczleweli@nabijaczleweli.xyz>


Would you add yourself to .mailmap with your preferred name?  Or
do you prefer to keep the ambiguity maybe?  :-)

Cheers,
Alex

> 
> Best,

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-23 23:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-23 20:17 [PATCH] putenv.3: originated in SysVr2; in 4.3BSD-Reno; fixed on modern systems наб
2023-05-23 20:20 ` Alejandro Colomar
2023-05-23 20:58   ` наб
2023-05-23 23:20     ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).