From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030524AbXDVTal (ORCPT ); Sun, 22 Apr 2007 15:30:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030682AbXDVTal (ORCPT ); Sun, 22 Apr 2007 15:30:41 -0400 Received: from smtp1.linux-foundation.org ([65.172.181.25]:35861 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030524AbXDVTak (ORCPT ); Sun, 22 Apr 2007 15:30:40 -0400 Date: Sun, 22 Apr 2007 12:29:55 -0700 (PDT) From: Linus Torvalds To: Junio C Hamano cc: Nicolas Pitre , git@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Today's 'master' leaves .idx/.pack in 0400 In-Reply-To: <7vd51wmd1a.fsf@assigned-by-dhcp.cox.net> Message-ID: References: <7vhcrml4wx.fsf@assigned-by-dhcp.cox.net> <7v1widrl0o.fsf@assigned-by-dhcp.cox.net> <7vvefonvdz.fsf@assigned-by-dhcp.cox.net> <7vmz10nv1h.fsf_-_@assigned-by-dhcp.cox.net> <7vejmcnu28.fsf@assigned-by-dhcp.cox.net> <7vy7kkmdtg.fsf@assigned-by-dhcp.cox.net> <7vd51wmd1a.fsf@assigned-by-dhcp.cox.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 22 Apr 2007, Junio C Hamano wrote: > > How about this as a replacement (hot off the press -- still > running the tests). Looks good, but.. > + mode_t mode = umask(0); > + > + umask(mode); > + mode = 0666 & ~mode; I would really suggest just defaulting to mode = 0444 & ~mode; since there simply is never any reason to allow a writable pack-file. The fact that we have some tests that try to corrupt a pack-file is not really a reason. Just make them do "chmod +w" before corrupting it. But your patch is an obvious improvement regardless, so I certainly don't think this is a *big* issue. Linus