From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_CSS,URIBL_CSS_A shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id D9E151F4D7 for ; Sat, 14 May 2022 07:08:38 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=web.de header.i=@web.de header.b="dJuh7y1h"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231653AbiENHGh (ORCPT ); Sat, 14 May 2022 03:06:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbiENHGf (ORCPT ); Sat, 14 May 2022 03:06:35 -0400 Received: from mout.web.de (mout.web.de [212.227.15.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB01FCD8 for ; Sat, 14 May 2022 00:06:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1652511969; bh=gnTsN7kvZxkYR8Lbny/MqZ8+QBrqEabOYFLjpQecZSM=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=dJuh7y1hhDFJCwy3NJJ85ChXexdluEA7p+niDqCqtXaMAl2Vfl0ALnk7/Algz+eNi HQzjRkG0MdL+7YsBg2ZPF1SFII33h0dAh95joIgtDnXSONpQZKXhsFIGJ44/E/UQT+ va+5Y2WR2RaqHaKd9bcpYGImKlaiivH6cA3zo4S8= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [192.168.178.29] ([91.47.145.161]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MtPre-1o3aud2WQI-00vBUB; Sat, 14 May 2022 09:06:09 +0200 Message-ID: <20179ba6-33d5-e95e-cf90-10aabc81734b@web.de> Date: Sat, 14 May 2022 09:06:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v4 1/7] archive: optionally add "virtual" files Content-Language: en-US To: Junio C Hamano Cc: rsbecker@nexbridge.com, 'Johannes Schindelin via GitGitGadget' , git@vger.kernel.org, 'Taylor Blau' , 'Derrick Stolee' , 'Elijah Newren' , 'Johannes Schindelin' References: <45662cf582ab7c8b1c32f55c9a34f4d73a28b71d.1652210824.git.gitgitgadget@gmail.com> <03d701d864ba$46d15c10$d4741430$@nexbridge.com> <3cf6e4f8-9151-6d68-21ca-b94d6a7557e6@web.de> <47ed5a2f-f4aa-1ec1-27c9-9b0b70eb8bca@web.de> From: =?UTF-8?Q?Ren=c3=a9_Scharfe?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:E1iWGkFD+/Wuz4DFgthwdIvIBS66RfUX4b1lAPFxaE1WG+eANum SVHRPRMelLw5UZQYofOO0tvrV9yPfTCoH6s1D72UOSYTNhZxDhIXI8BoTNpUI5jrJlIvYw/ blrlCQLJlgc6n7JOoMKBNkKvAOKhbAh8u41wQwrUshDahOnC7tX7Qg65O+LlUNn331w2iK2 aOxwpPpqDZhcSYILLq+Zg== X-UI-Out-Filterresults: notjunk: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2I/GcIpH5pZJQSumEH/PLI+1Kguu0CtVsvms7bf5Sb+dQKQTfgGvk4ih/7 Vr12qiHN+jF/Z4Z22iUUBmXfQYntRXfkvpy Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Am 12.05.22 um 23:31 schrieb Junio C Hamano: > Junio C Hamano writes: > >>> So we currently leak permission bits of executable files into ZIP >>> archives, but not tar files. :-| Normalizing those to 0755 would be >>> more consistent. > > Today, I was scanning the "What's cooking" draft and saw too many > topics that are marked with "Expecting a reroll". It turns out that > this "mode bits" thing will not be a blocker to make us wait for a > reroll of the topic, so let's handle it separately, before we > forget, as an independent fix outside the series under discussion. > > Thanks. > > --- >8 --- > Subject: [PATCH] archive: do not let on-disk mode leak to zip archives > > When the "--add-file" option is used to add the contents from an > untracked file to the archive, the permission mode bits for these > files are sent to the archive-backend specific "write_entry()" > method as-is. We normalize the mode bits for tracked files way > before we pass them to the write_entry() method; we should do the > same here. > > This is not strictly needed for "tar" archive-backend, as it has its > own code to further clean them up, but "zip" archive-backend is not > so well prepared. > > Signed-off-by: Junio C Hamano > --- > archive.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/archive.c b/archive.c > index e29d0e00f6..12a08af531 100644 > --- a/archive.c > +++ b/archive.c > @@ -342,7 +342,7 @@ int write_archive_entries(struct archiver_args *args= , > else > err =3D write_entry(args, &fake_oid, path_in_archive.buf, > path_in_archive.len, > - info->stat.st_mode, > + canon_mode(info->stat.st_mode), > content.buf, content.len); > if (err) > break; Looks good to me, thank you! Ren=C3=A9