From MAILER-DAEMON Sun Jun 10 09:29:48 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HxNUK-00018T-2F for mharc-bug-gzip@gnu.org; Sun, 10 Jun 2007 09:29:48 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HxD5I-0002AY-Ec for bug-gzip@gnu.org; Sat, 09 Jun 2007 22:23:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HxD5H-0002AM-VJ for bug-gzip@gnu.org; Sat, 09 Jun 2007 22:23:16 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HxD5H-0002AJ-Po for bug-gzip@gnu.org; Sat, 09 Jun 2007 22:23:15 -0400 Received: from ug-out-1314.google.com ([66.249.92.170]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HxD5H-0004Ex-AX for bug-gzip@gnu.org; Sat, 09 Jun 2007 22:23:15 -0400 Received: by ug-out-1314.google.com with SMTP id 34so1372702ugf for ; Sat, 09 Jun 2007 19:23:13 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=KCXkKyuzd0MAUXROEUtA0imxwhkPqKQR7dOEX9BXf9qWXRR1taM/BZ+RxWTYSJmYvuGxAFCoI6rP31tu4pSOSww4tdw6K1S15tv8DI3T4tIs1gCh4Jt0zqAw3C7TXTIIGSsPjFL/SqD8GJWLEVreLRQqRO5U6pqgTVQwbHM86oM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=Oe6Emde+tT/4rzoq/RGuNv+XYFku9ZEpuW1zCWaC9LgwpueHk5v0+z4r1kC+g0Ztz6tFsHQWGjTf6/SXdp78GRKxZpezjPxGd1RGwIT9jBl39eAoWAv+EbRkiuu0eVmFE+hjT9QDlbX9huSYzlj5nq3uXYvbh8o7xqjwfyU1EzU= Received: by 10.78.132.2 with SMTP id f2mr1733715hud.1181442193530; Sat, 09 Jun 2007 19:23:13 -0700 (PDT) Received: by 10.78.51.18 with HTTP; Sat, 9 Jun 2007 19:23:13 -0700 (PDT) Message-ID: Date: Sat, 9 Jun 2007 22:23:13 -0400 From: "Ighighi Ighighi" To: bug-gzip@gnu.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_23302_30724563.1181442193500" X-detected-kernel: Linux 2.4-2.6 (Google crawlbot) X-Mailman-Approved-At: Sun, 10 Jun 2007 09:29:47 -0400 Subject: [patch]: add support to -k option as used by bzip2(1) X-BeenThere: bug-gzip@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "GNU gzip discussion and bug reports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jun 2007 02:23:16 -0000 ------=_Part_23302_30724563.1181442193500 Content-Type: multipart/alternative; boundary="----=_Part_23303_18587300.1181442193500" ------=_Part_23303_18587300.1181442193500 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline The new BSD-licensed gzip(1) in FreeBSD as well as the GNU gzip(1) available through ports now support the -k option to prevent both gzip & gunzip from deleting the input file after processing it. Attached patch to 1.3.12follows. http://www.freebsd.org/cgi/query-pr.cgi?pr=113397 ------=_Part_23303_18587300.1181442193500 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline The new BSD-licensed gzip(1) in FreeBSD as well as the GNU gzip(1) available through ports now support the -k option to prevent both gzip & gunzip from deleting the input file after processing it. Attached patch to 1.3.12 follows.

http://www.freebsd.org/cgi/query-pr.cgi?pr=113397 ------=_Part_23303_18587300.1181442193500-- ------=_Part_23302_30724563.1181442193500 Content-Type: text/x-patch; name=patch-gzip.patch; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_f2qv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0gMDsgYnJlYWs7CiAJY2FzZSAnbCc6CiAJICAgIGxpc3QgPSBkZWNvbXByZXNzID0g dG9fc3Rkb3V0ID0gMTsgYnJlYWs7CiAJY2FzZSAnTCc6CkBAIC04MjUsNyArODMxLDcgQEAKICAg ICBpZiAoIXRvX3N0ZG91dCkKICAgICAgIHsKIAlzaWdzZXRfdCBvbGRzZXQ7Ci0JaW50IHVubGlu a19lcnJubzsKKwlpbnQgdW5saW5rX2Vycm5vID0gMDsKIAogCWNvcHlfc3RhdCAoJmlzdGF0KTsK IAlpZiAoY2xvc2UgKG9mZCkgIT0gMCkKQEAgLTgzMyw3ICs4MzksOCBAQAogCiAJc2lncHJvY21h c2sgKFNJR19CTE9DSywgJmNhdWdodF9zaWduYWxzLCAmb2xkc2V0KTsKIAlyZW1vdmVfb2ZuYW1l X2ZkID0gLTE7Ci0JdW5saW5rX2Vycm5vID0geHVubGluayAoaWZuYW1lKSA9PSAwID8gMCA6IGVy cm5vOworCWlmIChyZW1vdmVfaWZuYW1lKQorCSAgdW5saW5rX2Vycm5vID0geHVubGluayAoaWZu YW1lKSA9PSAwID8gMCA6IGVycm5vOwogCXNpZ3Byb2NtYXNrIChTSUdfU0VUTUFTSywgJm9sZHNl dCwgTlVMTCk7CiAKIAlpZiAodW5saW5rX2Vycm5vKQo= ------=_Part_23302_30724563.1181442193500-- From MAILER-DAEMON Tue Jun 12 13:00:45 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Hy9jZ-0003tx-2K for mharc-bug-gzip@gnu.org; Tue, 12 Jun 2007 13:00:45 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hy7nt-00043x-D9 for bug-gzip@gnu.org; Tue, 12 Jun 2007 10:57:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hy7np-00043M-GM for bug-gzip@gnu.org; Tue, 12 Jun 2007 10:57:05 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hy7np-00043J-DV for bug-gzip@gnu.org; Tue, 12 Jun 2007 10:57:01 -0400 Received: from hscantispam.hsc.usf.edu ([131.247.67.45] helo=hscantispam.health.usf.edu) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hy7no-0007O6-Um for bug-gzip@gnu.org; Tue, 12 Jun 2007 10:57:01 -0400 X-ASG-Debug-ID: 1181660215-6d4600340004-OSXIhY X-Barracuda-URL: http://hscantispam.health.usf.edu:8000/cgi-bin/mark.cgi X-Barracuda-Connect: unknown[131.247.67.144] X-Barracuda-Start-Time: 1181660215 Received: from HSCMAIL.hscnet.hsc.usf.edu (unknown [131.247.67.144]) by hscantispam.health.usf.edu (Spam Firewall) with ESMTP id 78F279351EF for ; Tue, 12 Jun 2007 10:56:55 -0400 (EDT) Received: from COMEXCHANGE2.hscnet.hsc.usf.edu ([131.247.67.145]) by HSCMAIL.hscnet.hsc.usf.edu with Microsoft SMTPSVC(6.0.3790.1830); Tue, 12 Jun 2007 10:54:14 -0400 Received: from 10.119.21.122 ([10.119.21.122]) by COMEXCHANGE2.hscnet.hsc.usf.edu ([131.247.67.185]) via Exchange Front-End Server hscwebmail2.hsc.usf.edu ([131.247.67.228]) with Microsoft Exchange Server HTTP-DAV ; Tue, 12 Jun 2007 14:48:51 +0000 Received: from cisc1 by hscwebmail2.hsc.usf.edu; 12 Jun 2007 10:50:31 -0400 X-ASG-Orig-Subj: chown before chmod in gzip.c copy_stat prevents chmod From: "O'Connor, Russell" To: bug-gzip@gnu.org Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Tue, 12 Jun 2007 10:50:31 -0400 Message-Id: <1181659831.4707.9.camel@cisc1.hscnet.hsc.usf.edu> Mime-Version: 1.0 X-Mailer: Evolution 2.10.2 X-OriginalArrivalTime: 12 Jun 2007 14:54:14.0340 (UTC) FILETIME=[8B161040:01C7AD01] X-Barracuda-Virus-Scanned: by USF Health AntiSpam System at health.usf.edu X-detected-kernel: Genre and OS details not recognized. X-Mailman-Approved-At: Tue, 12 Jun 2007 13:00:43 -0400 Subject: chown before chmod in gzip.c copy_stat prevents chmod X-BeenThere: bug-gzip@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "GNU gzip discussion and bug reports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2007 14:57:05 -0000 The CVS change log for revision 1.6 of gzip.c says "Invoke chmod before chown, to close a race condition." But the change actually moves chown before chmod. With chown before chmod, if you don't own the file, you won't be able to change the permissions, and they will be left at 0600, and gzip reports "Operation not permitted". Is this intentional? -- Russ From MAILER-DAEMON Tue Jun 12 18:24:45 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HyEn7-0005j4-69 for mharc-bug-gzip@gnu.org; Tue, 12 Jun 2007 18:24:45 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HyEn5-0005iw-OV for bug-gzip@gnu.org; Tue, 12 Jun 2007 18:24:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HyEn4-0005ie-B6 for bug-gzip@gnu.org; Tue, 12 Jun 2007 18:24:43 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HyEn4-0005ib-7M for bug-gzip@gnu.org; Tue, 12 Jun 2007 18:24:42 -0400 Received: from kiwi.cs.ucla.edu ([131.179.128.19]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HyEn3-0001Mm-Qn for bug-gzip@gnu.org; Tue, 12 Jun 2007 18:24:42 -0400 Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by kiwi.cs.ucla.edu (8.13.8+Sun/8.13.8/UCLACS-6.0) with ESMTP id l5CMOan2009270; Tue, 12 Jun 2007 15:24:36 -0700 (PDT) Received: from eggert by penguin.cs.ucla.edu with local (Exim 4.63) (envelope-from ) id 1HyEmy-0005ck-Ll; Tue, 12 Jun 2007 15:24:36 -0700 From: Paul Eggert To: "O'Connor, Russell" References: <1181659831.4707.9.camel@cisc1.hscnet.hsc.usf.edu> Date: Tue, 12 Jun 2007 15:24:36 -0700 In-Reply-To: <1181659831.4707.9.camel@cisc1.hscnet.hsc.usf.edu> (Russell O'Connor's message of "Tue, 12 Jun 2007 10:50:31 -0400") Message-ID: <87k5u8lskb.fsf@penguin.cs.ucla.edu> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-kernel: Solaris 10 (beta) Cc: bug-gzip@gnu.org Subject: Re: chown before chmod in gzip.c copy_stat prevents chmod X-BeenThere: bug-gzip@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "GNU gzip discussion and bug reports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2007 22:24:43 -0000 "O'Connor, Russell" writes: > The CVS change log for revision 1.6 of gzip.c says "Invoke chmod before > chown, to close a race condition." But the change actually moves chown > before chmod. Sorry, the change log is wrong. I'll fix it. > With chown before chmod, if you don't own the file, you > won't be able to change the permissions, and they will be left at 0600, > and gzip reports "Operation not permitted". Is this intentional? Yes. The problem is that on many hosts, if you chown a file there is a side effect that chmods it as well. So you must chown before chmoding. On most systems, if you have enough privileges to chown a file, you can also chmod it afterwards, so it's not a problem. On systems where you can give files away you will have problems, true. The usual workaround is "Don't do that". From MAILER-DAEMON Wed Jun 13 05:55:12 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HyPZI-00046y-EW for mharc-bug-gzip@gnu.org; Wed, 13 Jun 2007 05:55:12 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HyPZH-00046i-Hi for bug-gzip@gnu.org; Wed, 13 Jun 2007 05:55:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HyPZF-00046V-8H for bug-gzip@gnu.org; Wed, 13 Jun 2007 05:55:10 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HyPZF-00046S-23 for bug-gzip@gnu.org; Wed, 13 Jun 2007 05:55:09 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HyPZE-0002oY-Er for bug-gzip@gnu.org; Wed, 13 Jun 2007 05:55:08 -0400 Received: from dementia.proulx.com (dementia.proulx.com [192.168.1.115]) by joseki.proulx.com (Postfix) with ESMTP id 7F8D8FA64; Wed, 13 Jun 2007 03:55:07 -0600 (MDT) Received: by dementia.proulx.com (Postfix, from userid 1000) id 6177DD11D91; Wed, 13 Jun 2007 03:55:07 -0600 (MDT) Date: Wed, 13 Jun 2007 03:55:07 -0600 To: Raoul Behrend Message-ID: <20070613095507.GB3735@dementia.proulx.com> References: <4657FF93.1090102@obs.unige.ch> <20070527051738.GA19568@dementia.proulx.com> <46593B64.5070005@obs.unige.ch> <20070527162415.GA19505@dementia.proulx.com> <465DC8A5.3010901@obs.unige.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <465DC8A5.3010901@obs.unige.ch> User-Agent: Mutt/1.5.9i From: bob@proulx.com (Bob Proulx) X-detected-kernel: Genre and OS details not recognized. Cc: bug-gzip@gnu.org Subject: Re: Option wanted for gzip X-BeenThere: bug-gzip@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "GNU gzip discussion and bug reports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jun 2007 09:55:11 -0000 Raoul Behrend wrote: > For the application I devellope, I have to collect gzipped astronomical > images, calibrate (after gunzipping) them, and archive the raw image in a > compressed manner. The new modified ones are also archived after a > gzipping, while a copy of the unzipped processed images are sent to a > second pass of reduction. I think I followed that. The came in gzip'd. Long term archive gzip'd. Also keep a plain copy for current work, like a cache. > So, the flux is as below. > raw.fit.gz - archived > - gunzipped - modified by first pass > - gzipped and archived > - second pass of processing > > The first and second pass usually are not done at the same moment, as some > data have to be collected and analysed before the second pass. Sometimes, > two ot three passes of the whole files in necessary. Okay. > Due to the huge size of the data on the disks, I 'd like to keep to a > minimum hard disk works: this can be done using a kind of keeping of the > entry file in its current state at the end of the decompression or > compression operations. Sure. But then can't you just do this already? gzip -dc < raw.fit.gz > raw.fit That is the same as: gunzip < raw.fit.gz > raw.fit > bzip2 had a -k option which do the work nicely. Sure a -k option would work. But please explain how the above examples shown do not work. No change to the C source is required. > Remark: the naming of the file is unpredictable, so a special unportable > macro should be developped if one want to use the < and > redirectors to > specify the output name, as suggested in your first answer. I think this is something that you know that we do not know. Please educate us! You know something about your problem that makes this hard. But to me using shell for this is easy. Here is an example #!/bin/sh filename=raw.fit gzip -dc < $filename.gz > $filename Or #!/bin/sh filename=raw.fit.gz gzip -dc < $filename > $(basename $filename .gz) With the -k option it would be similar. #!/bin/sh filename=raw.fit.gz gzip -dk $filename People apparently want a gzip -k option and so eventually will probably get it. But meanwhile I maintain that it is not needed. The capability exits without needing an option. Personally I would avoid it because it will take years after addition before it could be counted upon as available for use. Bob From MAILER-DAEMON Wed Jun 13 12:59:25 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HyWBp-0006kY-GR for mharc-bug-gzip@gnu.org; Wed, 13 Jun 2007 12:59:25 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HyWBn-0006js-Rb for bug-gzip@gnu.org; Wed, 13 Jun 2007 12:59:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HyWBl-0006hf-97 for bug-gzip@gnu.org; Wed, 13 Jun 2007 12:59:22 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HyWBl-0006hc-41 for bug-gzip@gnu.org; Wed, 13 Jun 2007 12:59:21 -0400 Received: from kiwi.cs.ucla.edu ([131.179.128.19]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HyWBk-0000tF-KB for bug-gzip@gnu.org; Wed, 13 Jun 2007 12:59:20 -0400 Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by kiwi.cs.ucla.edu (8.13.8+Sun/8.13.8/UCLACS-6.0) with ESMTP id l5DGxI01014069; Wed, 13 Jun 2007 09:59:18 -0700 (PDT) Received: from eggert by penguin.cs.ucla.edu with local (Exim 4.63) (envelope-from ) id 1HyWBi-0000bn-7f; Wed, 13 Jun 2007 09:59:18 -0700 From: Paul Eggert To: "O'Connor, Russell" References: <1181659831.4707.9.camel@cisc1.hscnet.hsc.usf.edu> <87k5u8lskb.fsf@penguin.cs.ucla.edu> <1181743540.4738.3.camel@cisc1.hscnet.hsc.usf.edu> Date: Wed, 13 Jun 2007 09:59:18 -0700 In-Reply-To: <1181743540.4738.3.camel@cisc1.hscnet.hsc.usf.edu> (Russell O'Connor's message of "Wed, 13 Jun 2007 10:05:40 -0400") Message-ID: <87k5u7oknt.fsf@penguin.cs.ucla.edu> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-kernel: Solaris 10 (beta) Cc: bug-gzip@gnu.org Subject: Re: chown before chmod in gzip.c copy_stat prevents chmod X-BeenThere: bug-gzip@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "GNU gzip discussion and bug reports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jun 2007 16:59:24 -0000 "O'Connor, Russell" writes: > The file gets gzipped in the HPUX NFS case, too, but since the chown > works and the chmod fails, everyone but the owner loses access to it, > which is not OK. I suggest using the HP-UX setprivgrp command (or modifying /etc/privgroup) so that ordinary users cannot give away their files via chown. It's a bit more secure that way, anyway; that's why most OSes default to doing it this way nowadays. I suspect HP-UX defaults to the insecure behavior for historical reasons only. If you do that, you shouldn't need to modify gzip. From MAILER-DAEMON Sat Jun 16 21:08:37 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HzjFt-00009f-OO for mharc-bug-gzip@gnu.org; Sat, 16 Jun 2007 21:08:37 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HzjFr-00009E-AC for bug-gzip@gnu.org; Sat, 16 Jun 2007 21:08:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HzjFp-00008w-WD for bug-gzip@gnu.org; Sat, 16 Jun 2007 21:08:35 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HzjFp-00008t-Px for bug-gzip@gnu.org; Sat, 16 Jun 2007 21:08:33 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HzjFp-0004Il-8q for bug-gzip@gnu.org; Sat, 16 Jun 2007 21:08:33 -0400 Received: from dementia.proulx.com (dementia.proulx.com [192.168.1.115]) by joseki.proulx.com (Postfix) with ESMTP id CDCDBFA1B; Sat, 16 Jun 2007 19:08:32 -0600 (MDT) Received: by dementia.proulx.com (Postfix, from userid 1000) id C18B6D4C10B; Sat, 16 Jun 2007 19:08:32 -0600 (MDT) Date: Sat, 16 Jun 2007 19:08:32 -0600 To: "O'Connor, Russell" Message-ID: <20070617010832.GA11586@dementia.proulx.com> References: <1181659831.4707.9.camel@cisc1.hscnet.hsc.usf.edu> <87k5u8lskb.fsf@penguin.cs.ucla.edu> <1181743540.4738.3.camel@cisc1.hscnet.hsc.usf.edu> <87k5u7oknt.fsf@penguin.cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k5u7oknt.fsf@penguin.cs.ucla.edu> User-Agent: Mutt/1.5.9i From: bob@proulx.com (Bob Proulx) X-detected-kernel: Genre and OS details not recognized. Cc: bug-gzip@gnu.org Subject: Re: chown before chmod in gzip.c copy_stat prevents chmod X-BeenThere: bug-gzip@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "GNU gzip discussion and bug reports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 01:08:35 -0000 Paul Eggert wrote: > "O'Connor, Russell" writes: > > The file gets gzipped in the HPUX NFS case, too, but since the chown > > works and the chmod fails, everyone but the owner loses access to it, > > which is not OK. > > I suggest using the HP-UX setprivgrp command (or modifying > /etc/privgroup) so that ordinary users cannot give away their files > via chown. It's a bit more secure that way, anyway; that's why most > OSes default to doing it this way nowadays. I suspect HP-UX defaults > to the insecure behavior for historical reasons only. Agreed. For HP-UX that is a good suggestion. In particular creating the following file will do this. It gets loaded at boot time and can be set interactively with 'sudo setprivgrp -n CHOWN'. File /etc/privgroup: -n CHOWN > If you do that, you shouldn't need to modify gzip. Also if you don't do that then there will be a lot of free software programs that won't work because today almost all assumptions are that the above is the operating mode. I stopped trying to swim upstream and converted all of my HP-UX systems years ago and have not had any issues because of it. Now it is a point of interoperability between HP-UX and GNU/Linux. Bob From MAILER-DAEMON Fri Jun 22 03:10:09 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1I1dHU-0000DW-Sd for mharc-bug-gzip@gnu.org; Fri, 22 Jun 2007 03:10:08 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I1CLE-0000VC-Dx for bug-gzip@gnu.org; Wed, 20 Jun 2007 22:24:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I1CLC-0000Sz-4T for bug-gzip@gnu.org; Wed, 20 Jun 2007 22:24:11 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I1CLB-0000Sp-Re for bug-gzip@gnu.org; Wed, 20 Jun 2007 22:24:09 -0400 Received: from ihemail1.lucent.com ([135.245.0.33]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I1CLB-0002zQ-IP for bug-gzip@gnu.org; Wed, 20 Jun 2007 22:24:09 -0400 Received: from ihmail.ih.lucent.com (h135-1-218-70.lucent.com [135.1.218.70]) by ihemail1.lucent.com (8.13.8/IER-o) with ESMTP id l5L2O4Dk024791 for ; Wed, 20 Jun 2007 21:24:04 -0500 (CDT) Received: from static.ih.lucent.com (static.ih.lucent.com [135.185.166.69]) by ihmail.ih.lucent.com (8.11.7p1+Sun/8.12.11) with ESMTP id l5L2O4a22299 for ; Wed, 20 Jun 2007 21:24:04 -0500 (CDT) Received: from static.ih.lucent.com (static.ih.alcatel-lucent.com [127.0.0.1]) by static.ih.lucent.com (8.13.8/8.13.7) with ESMTP id l5L2O4rx013742 for ; Wed, 20 Jun 2007 21:24:04 -0500 Received: (from psfales@localhost) by static.ih.lucent.com (8.13.8/8.13.8/Submit) id l5L2O4pB013741 for bug-gzip@gnu.org; Wed, 20 Jun 2007 21:24:04 -0500 Date: Wed, 20 Jun 2007 21:24:04 -0500 From: Peter Fales To: bug-gzip@gnu.org Message-ID: <20070621022404.GA13711@alcatel-lucent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i X-Scanned-By: MIMEDefang 2.57 on 135.245.2.33 X-detected-kernel: Solaris 9 X-Mailman-Approved-At: Fri, 22 Jun 2007 03:10:07 -0400 Subject: zgrep (gzip-1.3.10) stops working on solaris X-BeenThere: bug-gzip@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "GNU gzip discussion and bug reports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2007 02:24:12 -0000 The zgrep script begins with "#!/bin/sh". When we upgraded from 1.3.9 to 1.3.12, it stopped working because line 61 uses constructs which are not comptabible with /bin/sh on (at least) Solaris 8. I believe this change was introduced in gzip-1.3.10. -- Peter Fales Alcatel-Lucent Member of Technical Staff 2000 Lucent Lane Room: 1C-436 Naperville, IL 60566-7033 Email: psfales@alcatel-lucent.com Phone: 630 979 8031 From MAILER-DAEMON Fri Jun 22 14:07:37 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1I1nXl-00052W-C3 for mharc-bug-gzip@gnu.org; Fri, 22 Jun 2007 14:07:37 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I1nXk-00052Q-9E for bug-gzip@gnu.org; Fri, 22 Jun 2007 14:07:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I1nXj-00052E-Ga for bug-gzip@gnu.org; Fri, 22 Jun 2007 14:07:35 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I1nXj-00052B-E5 for bug-gzip@gnu.org; Fri, 22 Jun 2007 14:07:35 -0400 Received: from kiwi.cs.ucla.edu ([131.179.128.19]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I1nXi-0002Cy-Sr for bug-gzip@gnu.org; Fri, 22 Jun 2007 14:07:35 -0400 Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by kiwi.cs.ucla.edu (8.13.8+Sun/8.13.8/UCLACS-6.0) with ESMTP id l5MI7V8E002366; Fri, 22 Jun 2007 11:07:31 -0700 (PDT) Received: from eggert by penguin.cs.ucla.edu with local (Exim 4.63) (envelope-from ) id 1I1nXf-0008Ds-4n; Fri, 22 Jun 2007 11:07:31 -0700 From: Paul Eggert To: Peter Fales References: <20070621022404.GA13711@alcatel-lucent.com> Date: Fri, 22 Jun 2007 11:07:31 -0700 In-Reply-To: <20070621022404.GA13711@alcatel-lucent.com> (Peter Fales's message of "Wed, 20 Jun 2007 21:24:04 -0500") Message-ID: <87tzszrhgc.fsf@penguin.cs.ucla.edu> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-kernel: Solaris 10 (beta) Cc: bug-gzip@gnu.org Subject: Re: zgrep (gzip-1.3.10) stops working on solaris X-BeenThere: bug-gzip@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bug-gzip@gnu.org List-Id: "GNU gzip discussion and bug reports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2007 18:07:36 -0000 Peter Fales writes: > The zgrep script begins with "#!/bin/sh". When we upgraded from 1.3.9 > to 1.3.12, it stopped working because line 61 uses constructs which > are not comptabible with /bin/sh on (at least) Solaris 8. I don't have this problem on my Solaris 8 (sparc) box. gzip 1.3.12 builds zgrep and installs it, with the first line being "#!/bin/bash". /bin/bash is a standard part of Solaris 8, in the SUNWbash package. If you don't have /bin/sh installed then the build process should fall back on /bin/ksh, which is in the core SUNWcsu package (the same package that has /bin/sh). Evidently something is going wrong on your platform, and this process isn't working. Can you please send bug-gzip@gnu.org the exact command that you used to configure gzip 1.3.12 on your platform, along with its output on a fresh copy of the distribution? It might also be helpful to send the output of the command "sh -x configure". Thanks.