NetBSD Problem Report #57858

From www@netbsd.org  Sun Jan 14 19:06:18 2024
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))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 8ADD31A9238
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 14 Jan 2024 19:06:18 +0000 (UTC)
Message-Id: <20240114190617.0A7A31A9239@mollari.NetBSD.org>
Date: Sun, 14 Jan 2024 19:06:17 +0000 (UTC)
From: rbranco@suse.de
Reply-To: rbranco@suse.de
To: gnats-bugs@NetBSD.org
Subject: gzip(1): bad recursive behaviour
X-Send-Pr-Version: www-1.0

>Number:         57858
>Category:       bin
>Synopsis:       gzip(1): bad recursive behaviour
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 14 19:10:00 +0000 2024
>Last-Modified:  Sun Feb 04 11:10:02 +0000 2024
>Originator:     Ricardo Branco
>Release:        NetBSD 10.0_RC2
>Organization:
>Environment:
>Description:
The handle_dir() function should pass fts_path and not fts_name because the latter is the basename(3). Because of this, not just verbose output but error messages as well are ambiguous when files with the same name exist.


>How-To-Repeat:
To reproduce:

$ mkdir /tmp/x /tmp/y
$ cp /etc/services /tmp/x
$ cp /etc/services /tmp/y
$ chmod 000 /tmp/x/services
$ gzip -vr /tmp/x /tmp/y
gzip: can't open services: Permission denied
services:          86.1% -- replaced with services.gz

With patch:

gzip: can't open /tmp/x/services: Permission denied
/tmp/y/services:	   86.1% -- replaced with /tmp/y/services.gz
>Fix:
Patched in FreeBSD: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=114470

Fix: https://github.com/NetBSD/src/pull/25

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57858 CVS commit: src/usr.bin/gzip
Date: Mon, 15 Jan 2024 12:35:48 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Mon Jan 15 17:35:48 UTC 2024

 Modified Files:
 	src/usr.bin/gzip: gzip.c

 Log Message:
 PR/57858: Ricardo Branco: Print the full pathname on errors.
 from FreeBSD https://github.com/NetBSD/src/pull/25


 To generate a diff of this commit:
 cvs rdiff -u -r1.120 -r1.121 src/usr.bin/gzip/gzip.c

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

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57858 CVS commit: [netbsd-10] src/usr.bin/gzip
Date: Sun, 4 Feb 2024 11:07:41 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Feb  4 11:07:41 UTC 2024

 Modified Files:
 	src/usr.bin/gzip [netbsd-10]: gzip.1 gzip.c unlz.c unpack.c

 Log Message:
 Pull up the following, requested by mrg in ticket #582:

 	usr.bin/gzip/gzip.1                             up to 1.32
 	usr.bin/gzip/gzip.c                             up to 1.122
 	usr.bin/gzip/unlz.c                             up to 1.8
 	usr.bin/gzip/unpack.c                           up to 1.4

 Sync usr.bin/gzip to HEAD to fix a few minor issues, including
 PR 57858 and PR 57855.


 To generate a diff of this commit:
 cvs rdiff -u -r1.31 -r1.31.10.1 src/usr.bin/gzip/gzip.1
 cvs rdiff -u -r1.118 -r1.118.2.1 src/usr.bin/gzip/gzip.c
 cvs rdiff -u -r1.7 -r1.7.2.1 src/usr.bin/gzip/unlz.c
 cvs rdiff -u -r1.3 -r1.3.14.1 src/usr.bin/gzip/unpack.c

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

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.