NetBSD Problem Report #58058

From mouse@Stone.Rodents-Montreal.ORG  Thu Mar 21 14:21:16 2024
Return-Path: <mouse@Stone.Rodents-Montreal.ORG>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3C8EA1A9239
	for <gnats-bugs@www46.NetBSD.org>; Thu, 21 Mar 2024 14:21:16 +0000 (UTC)
Message-Id: <202403211421.KAA23941@Stone.Rodents-Montreal.ORG>
Date: Thu, 21 Mar 2024 10:21:13 -0400 (EDT)
From: Mouse <mouse@Rodents-Montreal.ORG>
Reply-To: mouse@Rodents-Montreal.ORG
To: gnats-bugs@www46.NetBSD.org
Subject: _SC_PASS_MAX description slightly wrong
X-Send-Pr-Version: 3.95

>Number:         58058
>Category:       misc
>Synopsis:       _SC_PASS_MAX description slightly wrong
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          closed
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 21 14:25:00 +0000 2024
>Closed-Date:    Thu Mar 21 14:48:13 +0000 2024
>Last-Modified:  Thu Mar 21 14:50:01 +0000 2024
>Originator:     Mouse
>Release:        9.1, 5.2, and -current
>Organization:
	Dis-
>Environment:
	Noticed on 5.2/amd64.  Also found on 9.1/amd64.  cvsweb
	indicates present in -current as of 2024-03-21, sysconf.3
	version 1.52.
>Description:
	sysconf(3) describes _SC_PASS_MAX as "The maximum length of the
	password, not counting NULL.".  But NULL is semantic nonsense
	there; it should be "NUL", or possibly "null".  (Confusion like
	this is one reason I believe NULL should never be used; see
	http://ftp.rodents-montreal.org/mouse/blah/2009-10-09-1.html
	for more, including other reasons.)
>How-To-Repeat:
	Read sysconf(3).  Notice the semantic inconsistency.
>Fix:
	-The maximum length of the password, not counting
	-.Dv NULL .
	+The maximum length of the password, not counting the terminating NUL.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse@rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 21 Mar 2024 14:48:13 +0000
State-Changed-Why:
Fixed, thanks


From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58058 CVS commit: src/lib/libc/gen
Date: Thu, 21 Mar 2024 14:48:02 +0000

 Module Name:	src
 Committed By:	wiz
 Date:		Thu Mar 21 14:48:01 UTC 2024

 Modified Files:
 	src/lib/libc/gen: sysconf.3

 Log Message:
 Fix NUL/NULL confusion.

 One of these was reported by Mouse in PR 58058.


 To generate a diff of this commit:
 cvs rdiff -u -r1.52 -r1.53 src/lib/libc/gen/sysconf.3

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.