NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/60892: cvs acl/racl argument parsing is busted
>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
>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@localhost:/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)
{
Home |
Main Index |
Thread Index |
Old Index