From owner-freebsd-bugs Thu Jan 8 14:31:13 1998 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA09402 for bugs-outgoing; Thu, 8 Jan 1998 14:31:13 -0800 (PST) (envelope-from owner-freebsd-bugs) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA09364; Thu, 8 Jan 1998 14:31:05 -0800 (PST) (envelope-from gnats) Resent-Date: Thu, 8 Jan 1998 14:31:05 -0800 (PST) Resent-Message-Id: <199801082231.OAA09364@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, dada@sbox.tu-graz.ac.at Received: from mbox.tu-graz.ac.at (mbox.tu-graz.ac.at [129.27.2.6]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id JAA22337 for ; Mon, 5 Jan 1998 09:39:18 -0800 (PST) (envelope-from dada@localhost.tu-graz.ac.at) Received: from fcggsg07.icg.tu-graz.ac.at by mbox.tu-graz.ac.at with SMTP id AA03750 (5.67c/IDA-1.5t for ); Mon, 5 Jan 1998 18:39:24 +0100 Received: from localhost.tu-graz.ac.at (isdn019.tu-graz.ac.at [129.27.240.19]) by fcggsg07.icg.tu-graz.ac.at (8.8.8/8.8.8) with ESMTP id SAA26610 for ; Mon, 5 Jan 1998 18:38:21 +0100 (MET) Received: (from dada@localhost) by localhost.tu-graz.ac.at (8.8.8/8.8.5) id SAA07190; Mon, 5 Jan 1998 18:37:32 +0100 (CET) Message-Id: <199801051737.SAA07190@localhost.tu-graz.ac.at> Date: Mon, 5 Jan 1998 18:37:32 +0100 (CET) From: Martin Kammerhofer Reply-To: dada@sbox.tu-graz.ac.at To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/5439: catman -r deletes perl manpages Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 5439 >Category: bin >Synopsis: catman -r deletes perl manpages >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jan 8 14:31:03 PST 1998 >Last-Modified: >Originator: Martin Kammerhofer >Organization: Graz University of Technology >Release: FreeBSD 2.2.5-STABLE i386 >Environment: nothing special >Description: The manpage states that option -r of catman: -r, -remove Remove garbage, e. g. catpage without manpage, uncompressed cat- page but a compressed catpage exist, filenames with non-alphanu- meric characters, uncompressed manpage but a compressed manpage exist. Actually catman accepts [.+-[] in filenames but no colons. As a consequence catman - a perl script - will happily delete lots of manpages in /usr/local/lib/perl5/man/man3 because their filenames contain the string ``::''. >How-To-Repeat: catman -r /usr/local/lib/perl5/man/man3 >Fix: Index: catman.perl =================================================================== RCS file: /home/dada/cvsroot/scripts/catman.perl,v retrieving revision 2.1 retrieving revision 2.4 diff -u -r2.1 -r2.4 --- catman.perl 1998/01/05 13:37:34 2.1 +++ catman.perl 1998/01/05 15:55:10 2.4 @@ -228,7 +228,7 @@ next if $file eq "." || $file eq ".."; # fo_09-o.bar0 - if ($file !~ /^[\w\-\+\[\.]+\.\w+$/) { + if ($file !~ /^[\w-+[.:]+\.\w+$/) { &garbage("$mandir/$file", "Assume garbage") unless -d "$mandir/$file"; next; @@ -285,7 +285,7 @@ foreach $file (readdir(D)) { next if $file =~ /^(\.|\.\.)$/; # skip current and parent directory - if ($file !~ /^[\w\-\+\[\.]+\.\w+$/) { + if ($file !~ /^[\w-+[.:]+\.\w+$/) { &garbage("$catdir/$file", "Assume garbage") unless -d "$catdir/$file"; next; >Audit-Trail: >Unformatted: