NetBSD Problem Report #60892
From www@netbsd.org Fri Oct 16 21:10:47 2026
Return-Path: <www@netbsd.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)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.netbsd.org", Issuer "YR1" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 72ECF1A923B
for <gnats-bugs@gnats.NetBSD.org>; Fri, 16 Oct 2026 21:10:47 +0000 (UTC)
Message-Id: <20261016211046.2D0241A923C@mollari.NetBSD.org>
Date: Fri, 16 Oct 2026 21:10:46 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: cvs acl/racl argument parsing is busted
X-Send-Pr-Version: www-1.0
X-From4GNATS: "campbell+netbsd@mumble.net via gnats" <gnats-admin@NetBSD.org>
>Number: 60892
>Category: bin
>Synopsis: cvs acl/racl argument parsing is busted
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 16 21:15:00 +0000 2026
>Last-Modified: Fri Oct 16 21:35:01 +0000 2026
>Originator: Taylor R Campbell
>Release: current, 11, 10, 9, 8, 7
>Organization:
The CVS Still Exists??? Foundation
>Environment:
>Description:
The cvs acl/racl commands are unusable because argument parsing
is broken -- it sets `optind = 0' instead of `optind = 1'
before calling getopt, so getopt tries to parse the command
name as an the first option. This happens even though there is
a portability wrapper getoptreset() in CVS to do this properly.
>How-To-Repeat:
$ cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot acl -l pkgsrc
Usage: cvs acl [user||group:permissions] [-Rl] [-r tag] [directories...] [files...]
-R Process directories recursively.
-r rev Existing revision/tag.
-l List defined ACLs.
(Specify the --help global option for a list of other help options)
>Fix:
diff -r c378647806f7 external/gpl2/xcvs/dist/src/acl.c
--- a/external/gpl2/xcvs/dist/src/acl.c Fri Oct 16 17:47:48 2026 +0000
+++ b/external/gpl2/xcvs/dist/src/acl.c Fri Oct 16 21:09:51 2026 +0000
@@ -712,7 +712,7 @@ cvsacl (int argc, char **argv)
usage (is_racl ? racl_usage : acl_usage);
/* parse the args */
- optind = 0;
+ getoptreset ();
while ((c = getopt (argc, argv, "dRr:l")) != -1)
{
>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/60892 CVS commit: src/external/gpl2/xcvs/dist/src
Date: Fri, 16 Oct 2026 21:33:12 +0000
Module Name: src
Committed By: riastradh
Date: Fri Oct 16 21:33:12 UTC 2026
Modified Files:
src/external/gpl2/xcvs/dist/src: acl.c
Log Message:
cvs(1): Fix acl/racl argument parsing.
PR bin/60892: cvs acl/racl argument parsing is busted
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl2/xcvs/dist/src/acl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.