From owner-freebsd-ports-bugs@FreeBSD.ORG Thu May 26 15:20:06 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5633116A41C for ; Thu, 26 May 2005 15:20:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3504743D66 for ; Thu, 26 May 2005 15:20:05 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j4QFK5sp010871 for ; Thu, 26 May 2005 15:20:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4QFK4I6010870; Thu, 26 May 2005 15:20:04 GMT (envelope-from gnats) Date: Thu, 26 May 2005 15:20:04 GMT Message-Id: <200505261520.j4QFK4I6010870@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Scot Hetzel Cc: Subject: Re: ports/81502: archivers/torrentzip removes the read flag from zip files [sw-bug]. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Scot Hetzel List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2005 15:20:06 -0000 The following reply was made to PR ports/81502; it has been noted by GNATS. From: Scot Hetzel To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: Re: ports/81502: archivers/torrentzip removes the read flag from zip files [sw-bug]. Date: Thu, 26 May 2005 10:12:55 -0500 ------=_Part_348_29505210.1117120375227 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Attached is the fix to the permissions problem. torrentzip now use the sticky bit, instead of the read bin, to keep track of zip files that need to be processed. This change will be in the next release of torrentzip. --=20 DISCLAIMER: No electrons were harmed while sending this message. Only slightly bruised. ------=_Part_348_29505210.1117120375227 Content-Type: text/plain; name=patch-src-trrntzip.c; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-src-trrntzip.c" --- src/trrntzip.c-orig Mon May 2 08:38:40 2005 +++ src/trrntzip.c Sat May 7 02:51:55 2005 @@ -716,7 +716,7 @@ if (dirp) { - // First set all the files to read-only. This is so we can skip + // First set the sticky bit on all files. This is so we can skip // our new zipfiles if they are returned by readdir() a second time. while (direntp = readdir (dirp)) { @@ -732,7 +732,7 @@ if (strstr (szTmpBuf, ".zip\0")) { - chmod (direntp->d_name, S_IRUSR); + chmod (direntp->d_name, istat.st_mode | S_ISTXT); } } // Zip file is actually a dir @@ -780,9 +780,9 @@ sprintf (szTmpBuf, "%s", direntp->d_name); strlwr (szTmpBuf); - if (strstr (szTmpBuf, ".zip\0") && !(istat.st_mode & S_IWUSR)) + if (strstr (szTmpBuf, ".zip\0") && (istat.st_mode & S_ISTXT)) { - chmod (direntp->d_name, S_IWUSR); + chmod (direntp->d_name, istat.st_mode & ~S_ISTXT); mig.cEncounteredZips++; if (!mig.fProcessLog) ------=_Part_348_29505210.1117120375227--